#144 fixed "Character not found" warning

This commit is contained in:
Exodus4D
2016-05-09 19:30:38 +02:00
parent 72f01b153d
commit 535c9af548
4 changed files with 12 additions and 19 deletions

View File

@@ -600,10 +600,12 @@ abstract class BasicModel extends \DB\Cortex {
/**
* debug log function
* @param string $text
* @param $text
* @param string $logFile
*/
public static function log($text){
Controller\LogController::getLogger('debug')->write($text);
public static function log($text, $logFile = null){
$logFile = isset($logFile) ? $logFile : self::getF3()->get('PATHFINDER.LOGFILES.DEBUG');
Controller\LogController::getLogger($logFile)->write($text);
}
/**

View File

@@ -360,6 +360,7 @@ class CharacterModel extends BasicModel {
$formattedHeaderData = (new Mapper\IgbHeader($headerData->values))->getData();
// just for security -> check if Header Data matches THIS character
// in case current IGB-Character is NOT the one logged on -> don´t update log
if(
isset($formattedHeaderData['character']) &&
$formattedHeaderData['character']['id'] == $this->_id

View File

@@ -1628,15 +1628,10 @@ define([
if(
currentUserData &&
currentUserData.character
currentUserData.character &&
currentUserData.character.log
){
if(currentUserData.character.log){
characterLog = currentUserData.character.log;
}else if(CCP.isInGameBrowser() === true){
// if user is IGB online and log data is missing
// -> character API information not found!
showNotify({title: 'Character not found', text: 'Enter API information', type: 'error'});
}
characterLog = currentUserData.character.log;
}
return characterLog;

View File

@@ -1628,15 +1628,10 @@ define([
if(
currentUserData &&
currentUserData.character
currentUserData.character &&
currentUserData.character.log
){
if(currentUserData.character.log){
characterLog = currentUserData.character.log;
}else if(CCP.isInGameBrowser() === true){
// if user is IGB online and log data is missing
// -> character API information not found!
showNotify({title: 'Character not found', text: 'Enter API information', type: 'error'});
}
characterLog = currentUserData.character.log;
}
return characterLog;