moved dev mode constant
This commit is contained in:
@ -58,7 +58,7 @@ class ErrorHandler {
|
||||
$logMessage = $message . PHP_EOL . 'Class: ' . $exceptionClass . PHP_EOL . 'Trace:' . PHP_EOL . $traceString;
|
||||
$this->maniaControl->log($logMessage);
|
||||
|
||||
if (!ManiaControl::DEV_MODE) {
|
||||
if (!DEV_MODE) {
|
||||
$error = array();
|
||||
$error['Type'] = 'Exception';
|
||||
$error['Message'] = $message;
|
||||
@ -224,7 +224,7 @@ class ErrorHandler {
|
||||
}
|
||||
$this->maniaControl->log($logMessage);
|
||||
|
||||
if (!ManiaControl::DEV_MODE && !$userError && !$suppressed) {
|
||||
if (!DEV_MODE && !$userError && !$suppressed) {
|
||||
$error = array();
|
||||
$error['Type'] = 'Error';
|
||||
$error['Message'] = $message;
|
||||
@ -335,7 +335,7 @@ class ErrorHandler {
|
||||
* @return bool
|
||||
*/
|
||||
private function shouldStopExecution($errorNumber) {
|
||||
return ($errorNumber & E_ERROR || $errorNumber & E_USER_ERROR || $errorNumber & E_FATAL);
|
||||
return ($errorNumber & E_FATAL);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -53,7 +53,6 @@ class ManiaControl implements CommandListener, TimerListener {
|
||||
const OS_UNIX = 'Unix';
|
||||
const OS_WIN = 'Windows';
|
||||
const SCRIPT_TIMEOUT = 10;
|
||||
const DEV_MODE = false;
|
||||
const URL_WEBSERVICE = 'http://ws.maniacontrol.com/';
|
||||
const SETTING_PERMISSION_SHUTDOWN = 'Shutdown ManiaControl';
|
||||
const SETTING_PERMISSION_RESTART = 'Restart ManiaControl';
|
||||
|
@ -46,7 +46,7 @@ class UsageReporter implements TimerListener {
|
||||
* @param float $time
|
||||
*/
|
||||
public function reportUsage($time) {
|
||||
if (ManiaControl::DEV_MODE || !$this->maniaControl->settingManager->getSettingValue($this, self::SETTING_REPORT_USAGE)) {
|
||||
if (DEV_MODE || !$this->maniaControl->settingManager->getSettingValue($this, self::SETTING_REPORT_USAGE)) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user