edit dayz xml and debug param
This commit is contained in:
parent
da60f8b9b4
commit
5b28e721c8
3 changed files with 21 additions and 10 deletions
|
|
@ -53,6 +53,8 @@ $GLOBALS['_gsp_debug_errors'] = [];
|
|||
*/
|
||||
function gsp_apply_debug_level(int $level): void
|
||||
{
|
||||
$GLOBALS['_gsp_debug_level'] = $level;
|
||||
|
||||
switch ($level) {
|
||||
case 0:
|
||||
error_reporting(0);
|
||||
|
|
@ -81,9 +83,19 @@ function gsp_apply_debug_level(int $level): void
|
|||
* Fatal errors (E_ERROR, E_PARSE …) are handled by the shutdown function.
|
||||
*/
|
||||
set_error_handler(function (int $errno, string $errstr, string $errfile, int $errline): bool {
|
||||
$activeLevel = (int)($GLOBALS['_gsp_debug_level'] ?? DEBUG_LEVEL);
|
||||
|
||||
if ($activeLevel <= 1) {
|
||||
return true;
|
||||
}
|
||||
|
||||
if ($activeLevel === 2 && ($errno === E_DEPRECATED || $errno === E_USER_DEPRECATED || $errno === E_NOTICE || $errno === E_USER_NOTICE || $errno === E_STRICT)) {
|
||||
return true;
|
||||
}
|
||||
|
||||
// Respect the @ operator (error suppression)
|
||||
if (!(error_reporting() & $errno)) {
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
$levels = [
|
||||
|
|
@ -107,8 +119,7 @@ set_error_handler(function (int $errno, string $errstr, string $errfile, int $er
|
|||
'line' => $errline,
|
||||
];
|
||||
|
||||
// Do NOT suppress the built-in handler (allows display_errors to also show inline)
|
||||
return false;
|
||||
return true;
|
||||
});
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -288,12 +288,12 @@ class OGPView {
|
|||
$page = str_replace("%header_code%",$this->header_code,$page);
|
||||
$page = str_replace("%charset%",$this->charset,$page);
|
||||
$page = str_replace("%body%",$buffer,$page);
|
||||
$page = str_replace("%top%",$top,$page);
|
||||
$page = str_replace("%topbody%",$topbody,$page);
|
||||
$page = str_replace("%botbody%",$botbody,$page);
|
||||
$page = str_replace("%bottom%",$bottom,$page);
|
||||
$page = str_replace("%footer%",$footer,$page);
|
||||
$page = str_replace("%notifications%",@$notifications,$page);
|
||||
$page = str_replace("%top%",(string)$top,$page);
|
||||
$page = str_replace("%topbody%",(string)$topbody,$page);
|
||||
$page = str_replace("%botbody%",(string)$botbody,$page);
|
||||
$page = str_replace("%bottom%",(string)$bottom,$page);
|
||||
$page = str_replace("%footer%",(string)($footer ?? ''),$page);
|
||||
$page = str_replace("%notifications%",(string)($notifications ?? ''),$page);
|
||||
}
|
||||
|
||||
// Set the content-type header as this is needed by older browsers
|
||||
|
|
|
|||
|
|
@ -100,7 +100,7 @@ mysql -uremoteuser -pPkloyn7yvpht! -hmysql.iaregamer.com -e "FLUSH PRIVILEGES;"
|
|||
mysql -uremoteuser -pPkloyn7yvpht! -hmysql.iaregamer.com -D ${dbID} < 1.9.0_fresh.sql
|
||||
|
||||
mysql -uremoteuser -pPkloyn7yvpht! -hmysql.iaregamer.com -e "DELETE FROM panel.ogp_mysql_databases WHERE db_user = '${dbID}'"
|
||||
mysql -uremoteuser -pPkloyn7yvpht! -hmysql.iaregamer.com -e "INSERT INTO panel.ogp_mysql_databases(mysql_server_id, home_id, db_user, db_passwd, db_name, enabled) VALUES (1,${srvID},'${dbID}','${dbPass}','${dbID}',1)"
|
||||
mysql -uremoteuser -pPkloyn7yvpht! -hmysql.iaregamer.com -e "INSERT INTO panel.ogp_mysql_databases(mysql_server_id, home_id, db_user, db_passwd, db_name, enabled) VALUES (2,${srvID},'${dbID}','${dbPass}','${dbID}',1)"
|
||||
|
||||
# Create alsoRun.bat -----------------------------------
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue