so .. basicly everything was wrong with this one
This commit is contained in:
Sarjuuk
2015-07-20 11:33:48 +02:00
parent 5b8a862df9
commit 022ceba20d
10 changed files with 30 additions and 34 deletions

View File

@@ -218,7 +218,7 @@ class EventPage extends GenericPage
if ($v > 0)
$list[] = $v;
else if ($v === null)
Util::logError('game_event_prerequisite: this event has itself as prerequisite');
trigger_error('game_event_prerequisite: this event has itself as prerequisite', E_USER_WARNING);
});
if ($list)

View File

@@ -355,7 +355,7 @@ class ItemPage extends genericPage
}
else
{
Util::logError('Referenced PageTextId #'.$next.' is not in DB');
trigger_error('Referenced PageTextId #'.$next.' is not in DB', E_USER_WARNING);
break;
}
}

View File

@@ -509,7 +509,7 @@ class NpcPage extends GenericPage
}
}
else
Util::logError('NPC '.$this->typeId.' is flagged as trainer, but doesn\'t have any spells set');
trigger_error('NPC '.$this->typeId.' is flagged as trainer, but doesn\'t have any spells set', E_USER_WARNING);
}
// tab: sells

View File

@@ -213,7 +213,7 @@ class ObjectPage extends GenericPage
}
else
{
Util::logError('Referenced PageTextId #'.$next.' is not in DB');
trigger_error('Referenced PageTextId #'.$next.' is not in DB', E_USER_WARNING);
break;
}
}

View File

@@ -35,7 +35,7 @@ class ScreenshotPage extends GenericPage
if ($this->minSize <= 0)
{
Util::logError('config error: dimensions for uploaded screenshots equal or less than zero. Value forced to 200');
trigger_error('config error: dimensions for uploaded screenshots equal or less than zero. Value forced to 200', E_USER_WARNING);
$this->minSize = 200;
}
@@ -276,26 +276,26 @@ class ScreenshotPage extends GenericPage
switch ($_FILES['screenshotfile']['error'])
{
case 1:
Util::logError('validateScreenshot - the file exceeds the maximum size of '.ini_get('upload_max_filesize'));
trigger_error('validateScreenshot - the file exceeds the maximum size of '.ini_get('upload_max_filesize'), E_USER_WARNING);
return Lang::screenshot('error', 'selectSS');
case 3:
Util::logError('validateScreenshot - upload was interrupted');
trigger_error('validateScreenshot - upload was interrupted');
return Lang::screenshot('error', 'selectSS');
case 4:
Util::logError('validateScreenshot() - no file was received');
trigger_error('validateScreenshot() - no file was received', E_USER_WARNING);
return Lang::screenshot('error', 'selectSS');
case 6:
Util::logError('validateScreenshot - temporary upload directory is not set');
trigger_error('validateScreenshot - temporary upload directory is not set', E_USER_WARNING);
return Lang::main('intError');
case 7:
Util::logError('validateScreenshot - could not write temporary file to disk');
trigger_error('validateScreenshot - could not write temporary file to disk', E_USER_WARNING);
return Lang::main('intError');
}
// points to invalid file (hack attempt)
if (!is_uploaded_file($_FILES['screenshotfile']['tmp_name']))
{
Util::logError('validateScreenshot - uploaded file not in upload directory');
trigger_error('validateScreenshot - uploaded file not in upload directory', E_USER_WARNING);
return Lang::main('intError');
}