#144 fixed "Character not found" warning
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user