diff --git a/system/boot.php b/system/boot.php index 3359d90f..01ffe8b4 100644 --- a/system/boot.php +++ b/system/boot.php @@ -8,41 +8,9 @@ try { require_once 'init.php'; } catch (Throwable $e) { - $ui = new Smarty(); - $ui->setTemplateDir([ - 'custom' => File::pathFixer($UI_PATH . '/ui_custom/'), - 'default' => File::pathFixer($UI_PATH . '/ui/') - ]); - $ui->assign('_url', APP_URL . '/index.php?_route='); - $ui->setCompileDir(File::pathFixer($UI_PATH . '/compiled/')); - $ui->setConfigDir(File::pathFixer($UI_PATH . '/conf/')); - $ui->setCacheDir(File::pathFixer($UI_PATH . '/cache/')); - $ui->assign("error_title", "PHPNuxBill Crash"); - if (_auth()) { - $ui->assign("error_message", $e->getMessage() . '
'); - } else { - $ui->assign("error_message", $e->getMessage() . '
' . $e->getTraceAsString() . '
'); - } - $ui->display('router-error.tpl'); - die(); + die($e->getMessage() . '
' . $e->getTraceAsString() . '
'); } catch (Exception $e) { - $ui = new Smarty(); - $ui->setTemplateDir([ - 'custom' => File::pathFixer($UI_PATH . '/ui_custom/'), - 'default' => File::pathFixer($UI_PATH . '/ui/') - ]); - $ui->assign('_url', APP_URL . '/index.php?_route='); - $ui->setCompileDir(File::pathFixer($UI_PATH . '/compiled/')); - $ui->setConfigDir(File::pathFixer($UI_PATH . '/conf/')); - $ui->setCacheDir(File::pathFixer($UI_PATH . '/cache/')); - $ui->assign("error_title", "PHPNuxBill Crash"); - if (_auth()) { - $ui->assign("error_message", $e->getMessage() . '
'); - } else { - $ui->assign("error_message", $e->getMessage() . '
' . $e->getTraceAsString() . '
'); - } - $ui->display('router-error.tpl'); - die(); + die($e->getMessage() . '
' . $e->getTraceAsString() . '
'); } function _notify($msg, $type = 'e') diff --git a/system/controllers/login.php b/system/controllers/login.php index f86f752d..9bf565ba 100644 --- a/system/controllers/login.php +++ b/system/controllers/login.php @@ -5,10 +5,10 @@ * by https://t.me/ibnux **/ - $maintenance_mode = $config['maintenance_mode']; - if ($maintenance_mode == true){ - displayMaintenanceMessage(); - } +$maintenance_mode = $config['maintenance_mode']; +if ($maintenance_mode == true) { + displayMaintenanceMessage(); +} if (User::getID()) { r2(U . 'home');