From: Roland Häder Date: Sat, 7 Feb 2009 20:15:12 +0000 (+0000) Subject: Some functions rewritten to hungarian notation, handling of array rewritten X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=3daede4c904e23905c3e48dd6749019deca0a0e0;p=mailer.git Some functions rewritten to hungarian notation, handling of array rewritten --- diff --git a/click.php b/click.php index f5dbe4bd91..13431b1f3e 100644 --- a/click.php +++ b/click.php @@ -46,13 +46,12 @@ require("inc/config.php"); if (((!empty($_GET['user'])) || (!empty($_GET['reseller']))) && (!empty($_GET['banner']))) { // Update clicks counter... - $CLICK = 1; SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_refbanner SET clicks=clicks+1 WHERE id=%s LIMIT 1", array(bigintval($_GET['banner'])), __FILE__, __LINE__); if (SQL_AFFECTEDROWS() == 1) { if (!empty($_GET['user'])) { LOAD_URL("ref.php?refid=".bigintval($_GET['user'])); - } else { - LOAD_URL("shop_reseller.php?reseller=".bigintval($_GET['user'])); + } elseif (!empty($_GET['reseller'])) { + LOAD_URL("shop_reseller.php?reseller=".bigintval($_GET['reseller'])); } } // END - if } // END - if diff --git a/debug.php b/debug.php index 0d6150cadb..025ec75cfd 100644 --- a/debug.php +++ b/debug.php @@ -35,10 +35,9 @@ require_once("inc/libs/security_functions.php"); // Init "action" and "what" -global $what, $action, $FATAL; +global $what, $action; $GLOBALS['what'] = ""; $GLOBALS['action'] = ""; -$FATAL = array(); // Set module and fake "CSS mode" $GLOBALS['module'] = "debug"; $CSS = -1; @@ -47,7 +46,13 @@ $GLOBALS['module'] = "debug"; $CSS = -1; require("inc/config.php"); // Redirect only to registration page when this script is installed -if ((isBooleanConstantAndTrue('mxchange_installed')) && (count($FATAL) == 0)) { +if ((isBooleanConstantAndTrue('mxchange_installed')) && (getTotalFatalErrors() == 0)) { + // Is the extension installed? + if (!EXT_IS_ACTIVE("debug")) { + // Then abort here + exit; + } // END - if + // Is the request parameter set? if (isset($_POST['request'])) { // Handle the request @@ -77,7 +82,7 @@ if ((isBooleanConstantAndTrue('mxchange_installed')) && (count($FATAL) == 0)) { } } else { // Not installed or fatal errors - DEBUG_ABUSE_LOG(__FILE__, __LINE__, "request_fatal", count($FATAL)); + DEBUG_ABUSE_LOG(__FILE__, __LINE__, "request_fatal", getTotalFatalErrors()); } // END - if // Really all done here... ;-) diff --git a/inc/databases.php b/inc/databases.php index c7fed7c1a5..768f9b6264 100644 --- a/inc/databases.php +++ b/inc/databases.php @@ -47,12 +47,12 @@ define('CODE_NO_COOKIES' , 0x006); define('CODE_CNTR_FAILED' , 0x008); define('CODE_LOGOUT_DONE' , 0x008); define('CODE_LOGOUT_FAILED' , 0x009); -define('CODE_URL_TLOCK' , 0x00A); -define('CODE_URL_FOUND' , 0x00B); -define('CODE_OVERLENGTH' , 0x00C); -define('CODE_SUBJ_URL' , 0x00D); -define('CODE_BLIST_URL' , 0x00E); -define('CODE_NO_RECS_LEFT' , 0x00F); +define('CODE_URL_TLOCK' , 0x00a); +define('CODE_URL_FOUND' , 0x00b); +define('CODE_OVERLENGTH' , 0x00c); +define('CODE_SUBJ_URL' , 0x00d); +define('CODE_BLIST_URL' , 0x00e); +define('CODE_NO_RECS_LEFT' , 0x00f); define('CODE_INVALID_TAGS' , 0x010); define('CODE_MORE_POINTS' , 0x011); define('CODE_COOKIES_DISABLED' , 0x012); @@ -63,15 +63,15 @@ define('CODE_USER_404' , 0x016); define('CODE_STATS_404' , 0x017); define('CODE_ALREADY_CONFIRMED', 0x018); define('CODE_ERROR_MAILID' , 0x019); -define('CODE_EXTENSION_PROBLEM', 0x01A); -define('CODE_MORE_RECEIVERS1' , 0x01B); -define('CODE_MORE_RECEIVERS2' , 0x01C); -define('CODE_MORE_RECEIVERS3' , 0x01D); -define('CODE_INVALID_URL' , 0x01E); -define('CODE_MENU_NOT_VALID' , 0x01F); +define('CODE_EXTENSION_PROBLEM', 0x01a); +define('CODE_MORE_RECEIVERS1' , 0x01b); +define('CODE_MORE_RECEIVERS2' , 0x01c); +define('CODE_MORE_RECEIVERS3' , 0x01d); +define('CODE_INVALID_URL' , 0x01e); +define('CODE_MENU_NOT_VALID' , 0x01f); define('CODE_LOGIN_FAILED' , 0x020); -define('CODE_BEG_SAME_AS_OWN' , 0x020); -define('CODE_UNHANDLED_STATUS' , 0x020); +define('CODE_BEG_SAME_AS_OWN' , 0x021); +define('CODE_UNHANDLED_STATUS' , 0x022); // Full version string: /([0-9]){1}\.([0-9]){1}\.([0-9]){1}(-(alpha|beta|pre|rc([1-3]))([0-9]+))?/ // If you understand regular expressions ^^^ you may know how I versionize... ;-) @@ -97,7 +97,7 @@ define('START_TDAY', MAKE_TIME(0, 0, 0, time())); define('SERVER_URL', "http://www.mxchange.org"); // Current SVN revision -define('CURR_SVN_REVISION', "715"); +define('CURR_SVN_REVISION', "716"); // Take a prime number which is long (if you know a longer one please try it out!) define('_PRIME', 591623); diff --git a/inc/db/lib-mysql3.php b/inc/db/lib-mysql3.php index fe37cb6699..b1104563e5 100644 --- a/inc/db/lib-mysql3.php +++ b/inc/db/lib-mysql3.php @@ -50,7 +50,7 @@ function SQL_QUERY ($sql_string, $F, $L) { // Run SQL command //* DEBUG: */ echo $sql_string."
\n"; $result = @mysql_query($sql_string, $link) - or ADD_FATAL($F." (".$L."):".mysql_error()."
+ or addFatalMessage($F." (".$L."):".mysql_error()."
Query string:
".$sql_string); @@ -176,14 +176,14 @@ function SQL_RESULT($res, $row, $field) { } // SQL connect function SQL_CONNECT($host, $login, $password, $F, $L) { - $connect = @mysql_connect($host, $login, $password) or ADD_FATAL($F." (".$L."):".mysql_error()); + $connect = @mysql_connect($host, $login, $password) or addFatalMessage($F." (".$L."):".mysql_error()); return $connect; } // SQL select database function SQL_SELECT_DB($dbName, $link, $F, $L) { $select = false; if (is_resource($link)) { - $select = @mysql_select_db($dbName, $link) or ADD_FATAL($F." (".$L."):".mysql_error()); + $select = @mysql_select_db($dbName, $link) or addFatalMessage($F." (".$L."):".mysql_error()); } return $select; } @@ -208,7 +208,7 @@ function SQL_CLOSE(&$link, $F, $L) { } // END - if // Close database link and forget the link - $close = @mysql_close($link) or ADD_FATAL($F." (".$L."):".mysql_error()); + $close = mysql_close($link) or addFatalMessage($F." (".$L."):".mysql_error()); $link = null; return $close; } diff --git a/inc/extensions/ext-cache.php b/inc/extensions/ext-cache.php index 3798fa9677..9d5f72a052 100644 --- a/inc/extensions/ext-cache.php +++ b/inc/extensions/ext-cache.php @@ -251,7 +251,7 @@ default: // Do stuff when extension is loaded $cacheInstance = new CacheSystem(getConfig('cache_update'), PATH."inc/".getConfig('cache_path'), getConfig('cache_tested')); if ($cacheInstance->getStatus() != "done") { // Failed to initialize cache sustem - ADD_FATAL(__FILE__."(".__LINE__."): ".CACHE_CANNOT_INITIALIZE); + addFatalMessage(__FILE__."(".__LINE__."): ".CACHE_CANNOT_INITIALIZE); } // END - if } // END - if break; diff --git a/inc/extensions/ext-rewrite.php b/inc/extensions/ext-rewrite.php index 4cb2b00ca0..3cdd3ce01c 100644 --- a/inc/extensions/ext-rewrite.php +++ b/inc/extensions/ext-rewrite.php @@ -52,7 +52,7 @@ case "register": // Do stuff when installation is running (modules.php?module=ad // Check if mod_rewrite is loadeded if (!IF_APACHE_MODULE_LOADED('mod_rewrite')){ $EXT_REPORTS_FAILURE = true; - ADD_FATAL(MOD_REWRITE_ERROR); + addFatalMessage(MOD_REWRITE_ERROR); } // END - if // SQL commands to run @@ -69,7 +69,7 @@ case "activate": // Do stuff when admin activates this extension if (!IF_APACHE_MODULE_LOADED('mod_rewrite')) { SQL_QUERY("UPDATE "._MYSQL_PREFIX."_extensions SET ext_active='N' WHERE ext_name='rewrite' LIMIT 1", __FILE__, __LINE__); $EXT_REPORTS_FAILURE = true; - ADD_FATAL(MOD_REWRITE_ERROR); + addFatalMessage(MOD_REWRITE_ERROR); } // END - if // SQL commands to run @@ -148,7 +148,7 @@ case "update": // Update an extension // Check if mod_rewrite is loadeded if (!IF_APACHE_MODULE_LOADED('mod_rewrite')){ $EXT_REPORTS_FAILURE = true; - //ADD_FATAL(MOD_REWRITE_ERROR); + //addFatalMessage(MOD_REWRITE_ERROR); } // END - if $UPDATE_NOTES = "Es wird beim Registrieren und aktivieren geprüft, ob im Apache das Modul mod_rewrite geladen wurde. Wenn mod_rewrite nicht gefunden werden konnte, wird abgebrochen."; break; @@ -163,7 +163,7 @@ default: // Do stuff when extension is loaded if (!IF_APACHE_MODULE_LOADED('mod_rewrite')){ $EXT_REPORTS_FAILURE = true; SQL_QUERY("UPDATE "._MYSQL_PREFIX."_extensions SET ext_active='N' WHERE ext_name='rewrite' LIMIT 1", __FILE__, __LINE__); - if (!IS_ADMIN())ADD_FATAL(MOD_REWRITE_ERROR); + if (!IS_ADMIN())addFatalMessage(MOD_REWRITE_ERROR); } // END - if break; } diff --git a/inc/fatal_errors.php b/inc/fatal_errors.php index 96a7d8539e..a3a476ca54 100644 --- a/inc/fatal_errors.php +++ b/inc/fatal_errors.php @@ -37,8 +37,7 @@ if (!defined('__SECURITY')) { require($INC); } -if ((sizeof($FATAL) > 0) || (!empty($FATAL[0]))) -{ +if (getTotalFatalErrors() > 0) { // Main div container LOAD_TEMPLATE("fatal_header"); @@ -77,12 +76,14 @@ if ((sizeof($FATAL) > 0) || (!empty($FATAL[0]))) // Load main template mxchange_die(LOAD_TEMPLATE("runtime_fatal_table", true, $OUT)); } + + // Message to regular users (non-admin) $CORR = FATAL_REPORT_ERRORS; // PHP warnings fixed if ($check == "done") { if (IS_ADMIN()) $CORR = FATAL_CORRECT_ERRORS; - } + } // END - if // Load footer template LOAD_TEMPLATE("fatal_footer", false, $CORR); diff --git a/inc/filters.php b/inc/filters.php index 9c4c86230d..bd4fd26d06 100644 --- a/inc/filters.php +++ b/inc/filters.php @@ -44,7 +44,7 @@ function INIT_FILTER_SYSTEM () { // Is the filter already initialized? if ((isset($filters)) && (is_array($filters))) { // Then abort here - ADD_FATAL(FILTER_FAILED_ALREADY_INIT); + addFatalMessage(FILTER_FAILED_ALREADY_INIT); return false; } // END - if @@ -143,7 +143,7 @@ function REGISTER_FILTER ($filterName, $filterFunction, $silentAbort = true, $fo if ((isset($filters[$filterName][$filterFunction])) && (!$force)) { // Then abort here if (!$silentAbort) { - ADD_FATAL(sprintf(FILTER_FAILED_ALREADY_ADDED, $filterFunction, $filterName)); + addFatalMessage(sprintf(FILTER_FAILED_ALREADY_ADDED, $filterFunction, $filterName)); } // END - if // Abort here @@ -153,7 +153,7 @@ function REGISTER_FILTER ($filterName, $filterFunction, $silentAbort = true, $fo // Is the function there? if (!function_exists($filterFunction)) { // Then abort here - ADD_FATAL(sprintf(FILTER_FAILED_NOT_FOUND, $filterFunction, $filterName)); + addFatalMessage(sprintf(FILTER_FAILED_NOT_FOUND, $filterFunction, $filterName)); return false; } // END - if @@ -177,7 +177,7 @@ function UNREGISTER_FILTER ($filterName, $filterFunction, $force = false, $dry_r // Is that filter there? if ((!isset($filters[$filterName][$filterFunction])) && (!$force)) { // Not found, so abort here - ADD_FATAL(sprintf(FILTER_FAILED_NOT_REMOVED, $filterFunction, $filterName)); + addFatalMessage(sprintf(FILTER_FAILED_NOT_REMOVED, $filterFunction, $filterName)); return false; } // END - if @@ -198,7 +198,7 @@ function RUN_FILTER ($filterName, $data = null, $silentAbort = true) { // Then abort here (quick'N'dirty hack) if ((!$silentAbort) && (defined('FILTER_FAILED_NO_FILTER_FOUND'))) { // Add fatal message - ADD_FATAL(sprintf(FILTER_FAILED_NO_FILTER_FOUND, $filterName)); + addFatalMessage(sprintf(FILTER_FAILED_NO_FILTER_FOUND, $filterName)); } // END - if // Abort here @@ -250,7 +250,7 @@ function FILTER_FLUSH_FILTERS () { // Is a database link here and not in installation mode? if ((!is_resource($link)) && (!isBooleanConstantAndTrue('mxchange_installing'))) { // Abort here - ADD_FATAL(sprintf(FILTER_FLUSH_FAILED_NO_DATABASE, $filterFunction, $filterName)); + addFatalMessage(sprintf(FILTER_FLUSH_FAILED_NO_DATABASE, $filterFunction, $filterName)); return false; } // END - if diff --git a/inc/footer.php b/inc/footer.php index 5e248a609b..9a7b05ffd9 100644 --- a/inc/footer.php +++ b/inc/footer.php @@ -45,7 +45,7 @@ if (!isset($footer)) $footer = 0; if (($footer != "1") && ($footer != "2") && ($CSS != "1")) { // Output the generated HTML code or do nothing in direct-mode - if (!empty($FATAL[0])) { + if (getTotalFatalMessages() > 0) { // Output fatal error messages require_once(PATH."inc/fatal_errors.php"); } // END - if diff --git a/inc/functions.php b/inc/functions.php index 049a0c5817..0562cceee6 100644 --- a/inc/functions.php +++ b/inc/functions.php @@ -222,7 +222,7 @@ function OUTPUT_RAW ($HTML) { } // Add a fatal error message to the queue array -function ADD_FATAL ($message, $extra="") { +function addFatalMessage ($message, $extra="") { global $FATAL; if (empty($extra)) { @@ -238,8 +238,25 @@ function ADD_FATAL ($message, $extra="") { DEBUG_LOG(__FUNCTION__, __LINE__, " message={$message}"); } +// Getter for total fatal message count +function getTotalFatalMessages () { + global $FATAL; + + // Init coun + $count = 0; + + // Do we have at least the first entry? + if (!empty($FATAL[0])) { + // Get total count + $count = count($FATAL); + } // END - if + + // Return value + return $count; +} + // Load a template file and return it's content (only it's name; do not use ' or ") -function LOAD_TEMPLATE($template, $return=false, $content=array()) { +function LOAD_TEMPLATE ($template, $return=false, $content=array()) { // Add more variables which you want to use in your template files global $DATA, $_CONFIG, $username; diff --git a/inc/header.php b/inc/header.php index b510202cc6..40a3a80863 100644 --- a/inc/header.php +++ b/inc/header.php @@ -92,7 +92,7 @@ if (($header != "1") && ($header != "2")) { define('__PAGE_TITLE', NO_CONFIG_FOUND_TITLE); // Do not add the fatal message in installation mode - if (basename($_SERVER['PHP_SELF']) != "install.php") ADD_FATAL(NO_CONFIG_FOUND); + if (basename($_SERVER['PHP_SELF']) != "install.php") addFatalMessage(NO_CONFIG_FOUND); } } // END - if diff --git a/inc/install-inc.php b/inc/install-inc.php index 0ff9df8997..1b9ecb61af 100644 --- a/inc/install-inc.php +++ b/inc/install-inc.php @@ -164,7 +164,7 @@ if ((!isBooleanConstantAndTrue('mxchange_installed')) || (!isBooleanConstantAndT if (empty($mysql['login'])) $mysql['login'] = "your_login"; if (empty($mysql['host'])) $mysql['host'] = "localhost"; if (empty($mysql['prefix'])) $mysql['prefix'] = "mxchange_"; - if ((sizeof($FATAL) > 0) || (!empty($FATAL[0]))) { + if (getTotalFatalErrors() > 0) { OUTPUT_HTML(""); foreach ($FATAL as $key => $err) { OUTPUT_HTML(" · ".FATAL_NO.($key + 1).": ".$err."
"); @@ -333,7 +333,7 @@ if ((!isBooleanConstantAndTrue('mxchange_installed')) || (!isBooleanConstantAndT case "finalize": // Write captured data to files if ((!empty($_POST['finalize'])) && (!isBooleanConstantAndTrue('mxchange_installed'))) { // You have submitted data then we have to reset the fatal messages - $FATAL = array(); $SQLs = array(); + $SQLs = array(); // Connect to MySQL server $link = SQL_CONNECT($mysql['host'], $mysql['login'], $mysql['pass1'], __FILE__, __LINE__); @@ -359,7 +359,7 @@ if ((!isBooleanConstantAndTrue('mxchange_installed')) || (!isBooleanConstantAndT // Are some SQLs found? if (count($SQLs) == 0) { // Abort here - ADD_FATAL(INSTALL_SQL_IMPORT_FAILED); + addFatalMessage(INSTALL_SQL_IMPORT_FAILED); return; } // END - if @@ -396,12 +396,12 @@ if ((!isBooleanConstantAndTrue('mxchange_installed')) || (!isBooleanConstantAndT install_WriteData($_POST['spath']."inc/config.php", "INSTALLED", "define('mxchange_installed', ", ");", "true", 0); } else { // Installation area not found! - ADD_FATAL(INSTALL_MISSING_DUMPS); + addFatalMessage(INSTALL_MISSING_DUMPS); } } // END - if } // END - if - if ((sizeof($FATAL) > 0) || ((isset($FATAL[0])) && ($FATAL[0] != ''))) { + if (getTotalFatalErrors() > 0) { $OUT = ""; foreach ($FATAL as $value) { $OUT .= "
  • ".$value."
  • \n"; @@ -455,7 +455,7 @@ if ((!isBooleanConstantAndTrue('mxchange_installed')) || (!isBooleanConstantAndT LOAD_TEMPLATE("install_finished"); } else { // Something goes wrong during installation! :-( - ADD_FATAL(INSTALL_FINALIZER_FAILED); + addFatalMessage(INSTALL_FINALIZER_FAILED); include ("inc/fatal_errors.php"); } break; @@ -466,7 +466,7 @@ if ((!isBooleanConstantAndTrue('mxchange_installed')) || (!isBooleanConstantAndT break; } } else { - ADD_FATAL(ALREADY_INSTALLED); + addFatalMessage(ALREADY_INSTALLED); } // ?> diff --git a/inc/libs/cache_functions.php b/inc/libs/cache_functions.php index 671853299b..bb5db58000 100644 --- a/inc/libs/cache_functions.php +++ b/inc/libs/cache_functions.php @@ -112,7 +112,7 @@ class CacheSystem { $this->storeExtensionVersion("cache"); } else { // Cannot create file - ADD_FATAL(__FILE__."(".__LINE__."): ".CACHE_PROBLEMS_DETECTED); + addFatalMessage(__FILE__."(".__LINE__."): ".CACHE_PROBLEMS_DETECTED); } } @@ -142,7 +142,7 @@ class CacheSystem { } } else { // Cannot create file - ADD_FATAL(__FILE__."(".__LINE__."): ".CACHE_PROBLEMS_DETECTED); + addFatalMessage(__FILE__."(".__LINE__."): ".CACHE_PROBLEMS_DETECTED); } } @@ -205,7 +205,7 @@ class CacheSystem { } } else { // Cache file not found or not readable - ADD_FATAL(__FILE__."(".__LINE__."): ".CACHE_CANNOT_LOAD_1.$this->inc.CACHE_CANNOT_LOAD_2); + addFatalMessage(__FILE__."(".__LINE__."): ".CACHE_CANNOT_LOAD_1.$this->inc.CACHE_CANNOT_LOAD_2); } } @@ -228,7 +228,7 @@ class CacheSystem { $this->rebuilt[$this->name] = true; } else { // Not removed! - ADD_FATAL(__FILE__."(".__LINE__."): ".CACHE_CANNOT_UNLINK_1.$this->inc.CACHE_CANNOT_UNLINK_2); + addFatalMessage(__FILE__."(".__LINE__."): ".CACHE_CANNOT_UNLINK_1.$this->inc.CACHE_CANNOT_UNLINK_2); } } // END - if } @@ -259,7 +259,7 @@ class CacheSystem { } } else { // Cannot write to cache! - ADD_FATAL(__FILE__."(".__LINE__."): ".CACHE_PROBLEMS_DETECTED); + addFatalMessage(__FILE__."(".__LINE__."): ".CACHE_PROBLEMS_DETECTED); } } @@ -283,7 +283,7 @@ class CacheSystem { } // END - foreach } else { // Cannot write array! - ADD_FATAL(__FILE__."(".__LINE__."): ".CACHE_PROBLEMS_DETECTED); + addFatalMessage(__FILE__."(".__LINE__."): ".CACHE_PROBLEMS_DETECTED); } } @@ -320,7 +320,7 @@ class CacheSystem { } // END - if } else { // Cannot write to cache! - ADD_FATAL(__FILE__."(".__LINE__."): ".CACHE_PROBLEMS_DETECTED); + addFatalMessage(__FILE__."(".__LINE__."): ".CACHE_PROBLEMS_DETECTED); } } @@ -338,7 +338,7 @@ class CacheSystem { //* DEBUG: */ print __METHOD__."(".__LINE__."): {$this->name} - {$ext_name}={$ext_ver}
    \n"; } else { // Cannot create file - ADD_FATAL(__FILE__."(".__LINE__."): ".CACHE_PROBLEMS_DETECTED); + addFatalMessage(__FILE__."(".__LINE__."): ".CACHE_PROBLEMS_DETECTED); } } diff --git a/inc/libs/security_functions.php b/inc/libs/security_functions.php index 5b5589359b..02b5132855 100644 --- a/inc/libs/security_functions.php +++ b/inc/libs/security_functions.php @@ -59,10 +59,6 @@ function secureString ($str, $strip=true) { // Run only once this security check/exchange if (defined('__SECURITY')) return; -// Fatal messages goes here -global $FATAL; -$FATAL = array(); - // Runtime/GPC quoting is off now... @set_magic_quotes_runtime(false); @ini_set('magic_quotes_gpc', false); // This may not work on some systems diff --git a/inc/libs/surfbar_functions.php b/inc/libs/surfbar_functions.php index 434ce4f15c..31cd556dad 100644 --- a/inc/libs/surfbar_functions.php +++ b/inc/libs/surfbar_functions.php @@ -253,7 +253,7 @@ function SURFBAR_MEMBER_DO_FORM ($formData, $URLs) { } else { // Log invalid request DEBUG_LOG(__FUNCTION__, __LINE__, " action={$formData['action']},id={$formData['id']},function={$functionName}"); - ADD_FATAL(sprintf("Invalid member action! action=%s,id=%s,function=%s", $formData['action'], $formData['id'], $functionName)); + addFatalMessage(sprintf("Invalid member action! action=%s,id=%s,function=%s", $formData['action'], $formData['id'], $functionName)); } // Return status @@ -413,7 +413,7 @@ function SURFBAR_MEMBER_EXECUTE_ACTION ($action, $urlData) { } // END - if } else { // Not found! - ADD_FATAL(sprintf(MEMBER_SURFBAR_EXECUTE_ACTION_404, $functionName)); + addFatalMessage(sprintf(MEMBER_SURFBAR_EXECUTE_ACTION_404, $functionName)); } // Return status @@ -653,7 +653,7 @@ function SURFBAR_NOTIFY_ADMIN ($messageType, $content) { if (defined($constantName)) { $subject = constant($constantName); } else { - ADD_FATAL(ADMIN_SURFBAR_NOTIFY_SUBJECT_404, $constantName); + addFatalMessage(ADMIN_SURFBAR_NOTIFY_SUBJECT_404, $constantName); } // Translate some data if present @@ -689,7 +689,7 @@ function SURFBAR_NOTIFY_USER ($messageType, $content) { if (defined($constantName)) { $subject = constant($constantName); } else { - ADD_FATAL(MEMBER_SURFBAR_NOTIFY_SUBJECT_404, $constantName); + addFatalMessage(MEMBER_SURFBAR_NOTIFY_SUBJECT_404, $constantName); } // Translate some data if present diff --git a/inc/modules/admin.php b/inc/modules/admin.php index 719533118c..9bb05dc9ec 100644 --- a/inc/modules/admin.php +++ b/inc/modules/admin.php @@ -332,7 +332,7 @@ if (!isBooleanConstantAndTrue('admin_registered')) { OUTPUT_HTML("".ADMIN_LOGOUT_FAILED.""); // Add fatal message - ADD_FATAL(CANNOT_UNREG_SESS); + addFatalMessage(CANNOT_UNREG_SESS); } } else { // Maybe an Admin want's to login? @@ -369,13 +369,13 @@ if (!isBooleanConstantAndTrue('admin_registered')) { case "404": // Administrator login not found $_POST['ok'] = $ret; DESTROY_ADMIN_SESSION(); - ADD_FATAL(ADMIN_NOT_FOUND); + addFatalMessage(ADMIN_NOT_FOUND); break; case "pass": // Wrong password $_POST['ok'] = $ret; DESTROY_ADMIN_SESSION(); - ADD_FATAL(WRONG_PASS); + addFatalMessage(WRONG_PASS); break; default: // Others will be logged diff --git a/inc/modules/admin/action- b/inc/modules/admin/action- index b376444c68..df0c9bf5a7 100644 --- a/inc/modules/admin/action- +++ b/inc/modules/admin/action- @@ -46,7 +46,7 @@ if (FILE_READABLE($INC)) { // Ok, we finally load the admin action module include($INC); } else { - ADD_FATAL(ADMIN_404_ACTION_1.$GLOBALS['what'].ADMIN_404_ACTION_2); + addFatalMessage(ADMIN_404_ACTION_1.$GLOBALS['what'].ADMIN_404_ACTION_2); } // diff --git a/inc/modules/admin/action-admins.php b/inc/modules/admin/action-admins.php index 57e0b82c79..37a2dbe46c 100644 --- a/inc/modules/admin/action-admins.php +++ b/inc/modules/admin/action-admins.php @@ -46,7 +46,7 @@ if (FILE_READABLE($INC)) { // Ok, we finally load the admin action module include($INC); } else { - ADD_FATAL(ADMIN_404_ACTION_1.$GLOBALS['what'].ADMIN_404_ACTION_2); + addFatalMessage(ADMIN_404_ACTION_1.$GLOBALS['what'].ADMIN_404_ACTION_2); } // diff --git a/inc/modules/admin/action-bank.php b/inc/modules/admin/action-bank.php index fd7f3e0325..cef20946e4 100644 --- a/inc/modules/admin/action-bank.php +++ b/inc/modules/admin/action-bank.php @@ -46,7 +46,7 @@ if (FILE_READABLE($INC)) { // Ok, we finally load the admin action module include($INC); } else { - ADD_FATAL(ADMIN_404_ACTION_1.$GLOBALS['what'].ADMIN_404_ACTION_2); + addFatalMessage(ADMIN_404_ACTION_1.$GLOBALS['what'].ADMIN_404_ACTION_2); } // diff --git a/inc/modules/admin/action-country.php b/inc/modules/admin/action-country.php index 4736252208..6c50163bf8 100644 --- a/inc/modules/admin/action-country.php +++ b/inc/modules/admin/action-country.php @@ -46,7 +46,7 @@ if (FILE_READABLE($INC)) { // Ok, we finally load the admin action module include($INC); } else { - ADD_FATAL(ADMIN_404_ACTION_1.$GLOBALS['what'].ADMIN_404_ACTION_2); + addFatalMessage(ADMIN_404_ACTION_1.$GLOBALS['what'].ADMIN_404_ACTION_2); } // diff --git a/inc/modules/admin/action-doubler.php b/inc/modules/admin/action-doubler.php index baa342f612..85af60e460 100644 --- a/inc/modules/admin/action-doubler.php +++ b/inc/modules/admin/action-doubler.php @@ -47,7 +47,7 @@ if (FILE_READABLE($INC)) { include($INC); } else { // "what file" not found - ADD_FATAL(ADMIN_404_ACTION_1.$GLOBALS['what'].ADMIN_404_ACTION_2); + addFatalMessage(ADMIN_404_ACTION_1.$GLOBALS['what'].ADMIN_404_ACTION_2); } // diff --git a/inc/modules/admin/action-email.php b/inc/modules/admin/action-email.php index 806fc69daf..e14a825f32 100644 --- a/inc/modules/admin/action-email.php +++ b/inc/modules/admin/action-email.php @@ -46,7 +46,7 @@ if (FILE_READABLE($INC)) { // Ok, we finally load the admin action module include($INC); } else { - ADD_FATAL(ADMIN_404_ACTION_1.$GLOBALS['what'].ADMIN_404_ACTION_2); + addFatalMessage(ADMIN_404_ACTION_1.$GLOBALS['what'].ADMIN_404_ACTION_2); } // diff --git a/inc/modules/admin/action-holiday.php b/inc/modules/admin/action-holiday.php index 79247485a3..184d74005d 100644 --- a/inc/modules/admin/action-holiday.php +++ b/inc/modules/admin/action-holiday.php @@ -46,7 +46,7 @@ if (FILE_READABLE($INC)) { // Ok, we finally load the admin action module include($INC); } else { - ADD_FATAL(ADMIN_404_ACTION_1.$GLOBALS['what'].ADMIN_404_ACTION_2); + addFatalMessage(ADMIN_404_ACTION_1.$GLOBALS['what'].ADMIN_404_ACTION_2); } // diff --git a/inc/modules/admin/action-login.php b/inc/modules/admin/action-login.php index 5e51c7f267..ff9a9ec376 100644 --- a/inc/modules/admin/action-login.php +++ b/inc/modules/admin/action-login.php @@ -46,7 +46,7 @@ if (FILE_READABLE($INC)) { // Ok, we finally load the admin action module include($INC); } else { - ADD_FATAL(ADMIN_404_ACTION_1.$GLOBALS['what'].ADMIN_404_ACTION_2); + addFatalMessage(ADMIN_404_ACTION_1.$GLOBALS['what'].ADMIN_404_ACTION_2); } // diff --git a/inc/modules/admin/action-menu.php b/inc/modules/admin/action-menu.php index 2643a16251..c327a28d3b 100644 --- a/inc/modules/admin/action-menu.php +++ b/inc/modules/admin/action-menu.php @@ -46,7 +46,7 @@ if (FILE_READABLE($INC)) { // Ok, we finally load the admin action module include($INC); } else { - ADD_FATAL(ADMIN_404_ACTION_1.$GLOBALS['what'].ADMIN_404_ACTION_2); + addFatalMessage(ADMIN_404_ACTION_1.$GLOBALS['what'].ADMIN_404_ACTION_2); } // diff --git a/inc/modules/admin/action-misc.php b/inc/modules/admin/action-misc.php index 0f33b8e677..b4aa437f93 100644 --- a/inc/modules/admin/action-misc.php +++ b/inc/modules/admin/action-misc.php @@ -46,7 +46,7 @@ if (FILE_READABLE($INC)) { // Ok, we finally load the admin action module include($INC); } else { - ADD_FATAL(ADMIN_404_ACTION_1.$GLOBALS['what'].ADMIN_404_ACTION_2); + addFatalMessage(ADMIN_404_ACTION_1.$GLOBALS['what'].ADMIN_404_ACTION_2); } // diff --git a/inc/modules/admin/action-mods.php b/inc/modules/admin/action-mods.php index e286fcab47..fe17518245 100644 --- a/inc/modules/admin/action-mods.php +++ b/inc/modules/admin/action-mods.php @@ -46,7 +46,7 @@ if (FILE_READABLE($INC)) { // Ok, we finally load the admin action module include($INC); } else { - ADD_FATAL(ADMIN_404_ACTION_1.$GLOBALS['what'].ADMIN_404_ACTION_2); + addFatalMessage(ADMIN_404_ACTION_1.$GLOBALS['what'].ADMIN_404_ACTION_2); } // diff --git a/inc/modules/admin/action-newsletter.php b/inc/modules/admin/action-newsletter.php index 4114603ea4..27a2b8b4f9 100644 --- a/inc/modules/admin/action-newsletter.php +++ b/inc/modules/admin/action-newsletter.php @@ -46,7 +46,7 @@ if (FILE_READABLE($INC)) { // Ok, we finally load the admin action module include($INC); } else { - ADD_FATAL(ADMIN_404_ACTION_1.$GLOBALS['what'].ADMIN_404_ACTION_2); + addFatalMessage(ADMIN_404_ACTION_1.$GLOBALS['what'].ADMIN_404_ACTION_2); } // diff --git a/inc/modules/admin/action-payouts.php b/inc/modules/admin/action-payouts.php index 8a44bf6450..8431860fe7 100644 --- a/inc/modules/admin/action-payouts.php +++ b/inc/modules/admin/action-payouts.php @@ -46,7 +46,7 @@ if (FILE_READABLE($INC)) { // Ok, we finally load the admin action module include($INC); } else { - ADD_FATAL(ADMIN_404_ACTION_1.$GLOBALS['what'].ADMIN_404_ACTION_2); + addFatalMessage(ADMIN_404_ACTION_1.$GLOBALS['what'].ADMIN_404_ACTION_2); } // diff --git a/inc/modules/admin/action-primera.php b/inc/modules/admin/action-primera.php index cc6d11dfa2..7f4fa85b57 100644 --- a/inc/modules/admin/action-primera.php +++ b/inc/modules/admin/action-primera.php @@ -46,7 +46,7 @@ if (FILE_READABLE($INC)) { // Ok, we finally load the admin action module include($INC); } else { - ADD_FATAL(ADMIN_404_ACTION_1.$GLOBALS['what'].ADMIN_404_ACTION_2); + addFatalMessage(ADMIN_404_ACTION_1.$GLOBALS['what'].ADMIN_404_ACTION_2); } // diff --git a/inc/modules/admin/action-rallye.php b/inc/modules/admin/action-rallye.php index 7534627533..c1b230cd90 100644 --- a/inc/modules/admin/action-rallye.php +++ b/inc/modules/admin/action-rallye.php @@ -46,7 +46,7 @@ if (FILE_READABLE($INC)) { // Ok, we finally load the admin action module include($INC); } else { - ADD_FATAL(ADMIN_404_ACTION_1.$GLOBALS['what'].ADMIN_404_ACTION_2); + addFatalMessage(ADMIN_404_ACTION_1.$GLOBALS['what'].ADMIN_404_ACTION_2); } // diff --git a/inc/modules/admin/action-repair.php b/inc/modules/admin/action-repair.php index 6073f068df..c6565fd0ed 100644 --- a/inc/modules/admin/action-repair.php +++ b/inc/modules/admin/action-repair.php @@ -46,7 +46,7 @@ if (FILE_READABLE($INC)) { // Ok, we finally load the admin action module include($INC); } else { - ADD_FATAL(ADMIN_404_ACTION_1.$GLOBALS['what'].ADMIN_404_ACTION_2); + addFatalMessage(ADMIN_404_ACTION_1.$GLOBALS['what'].ADMIN_404_ACTION_2); } // diff --git a/inc/modules/admin/action-setup.php b/inc/modules/admin/action-setup.php index 4cf61595b5..048bee24ef 100644 --- a/inc/modules/admin/action-setup.php +++ b/inc/modules/admin/action-setup.php @@ -46,7 +46,7 @@ if (FILE_READABLE($INC)) { // Ok, we finally load the admin action module include($INC); } else { - ADD_FATAL(ADMIN_404_ACTION_1.$GLOBALS['what'].ADMIN_404_ACTION_2); + addFatalMessage(ADMIN_404_ACTION_1.$GLOBALS['what'].ADMIN_404_ACTION_2); } // diff --git a/inc/modules/admin/action-sponsor.php b/inc/modules/admin/action-sponsor.php index 7effb6fb07..f840cf94f4 100644 --- a/inc/modules/admin/action-sponsor.php +++ b/inc/modules/admin/action-sponsor.php @@ -46,7 +46,7 @@ if (FILE_READABLE($INC)) { // Ok, we finally load the admin action module include($INC); } else { - ADD_FATAL(ADMIN_404_ACTION_1.$GLOBALS['what'].ADMIN_404_ACTION_2); + addFatalMessage(ADMIN_404_ACTION_1.$GLOBALS['what'].ADMIN_404_ACTION_2); } // ?> diff --git a/inc/modules/admin/action-stats.php b/inc/modules/admin/action-stats.php index add4def3f2..6926bd2755 100644 --- a/inc/modules/admin/action-stats.php +++ b/inc/modules/admin/action-stats.php @@ -46,7 +46,7 @@ if (FILE_READABLE($INC)) { // Ok, we finally load the admin action module include($INC); } else { - ADD_FATAL(ADMIN_404_ACTION_1.$GLOBALS['what'].ADMIN_404_ACTION_2); + addFatalMessage(ADMIN_404_ACTION_1.$GLOBALS['what'].ADMIN_404_ACTION_2); } // diff --git a/inc/modules/admin/action-surfbar.php b/inc/modules/admin/action-surfbar.php index 2a69435104..da666b587a 100644 --- a/inc/modules/admin/action-surfbar.php +++ b/inc/modules/admin/action-surfbar.php @@ -46,7 +46,7 @@ if (FILE_READABLE($INC)) { // Ok, we finally load the admin action module include($INC); } else { - ADD_FATAL(ADMIN_404_ACTION_1.$GLOBALS['what'].ADMIN_404_ACTION_2); + addFatalMessage(ADMIN_404_ACTION_1.$GLOBALS['what'].ADMIN_404_ACTION_2); } // diff --git a/inc/modules/admin/action-task.php b/inc/modules/admin/action-task.php index 9f28d4622f..f143558e1f 100644 --- a/inc/modules/admin/action-task.php +++ b/inc/modules/admin/action-task.php @@ -36,7 +36,7 @@ if ((!defined('__SECURITY')) || (!IS_ADMIN())) { $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php"; require($INC); } elseif (!EXT_IS_ACTIVE("task")) { - ADD_FATAL(EXTENSION_PROBLEM_EXT_INACTIVE, "task"); + addFatalMessage(EXTENSION_PROBLEM_EXT_INACTIVE, "task"); return; } @@ -49,7 +49,7 @@ if (FILE_READABLE($INC)) { // Ok, we finally load the admin action module include($INC); } else { - ADD_FATAL(ADMIN_404_ACTION_1.$GLOBALS['what'].ADMIN_404_ACTION_2); + addFatalMessage(ADMIN_404_ACTION_1.$GLOBALS['what'].ADMIN_404_ACTION_2); } // diff --git a/inc/modules/admin/action-theme.php b/inc/modules/admin/action-theme.php index dbf518f62b..b832d39e2a 100644 --- a/inc/modules/admin/action-theme.php +++ b/inc/modules/admin/action-theme.php @@ -46,7 +46,7 @@ if (FILE_READABLE($INC)) { // Ok, we finally load the admin action module include($INC); } else { - ADD_FATAL(ADMIN_404_ACTION_1.$GLOBALS['what'].ADMIN_404_ACTION_2); + addFatalMessage(ADMIN_404_ACTION_1.$GLOBALS['what'].ADMIN_404_ACTION_2); } // diff --git a/inc/modules/admin/action-transfer.php b/inc/modules/admin/action-transfer.php index 692128a1dd..08a6d3e150 100644 --- a/inc/modules/admin/action-transfer.php +++ b/inc/modules/admin/action-transfer.php @@ -46,7 +46,7 @@ if (FILE_READABLE($INC)) { // Ok, we finally load the admin action module include($INC); } else { - ADD_FATAL(ADMIN_404_ACTION_1.$GLOBALS['what'].ADMIN_404_ACTION_2); + addFatalMessage(ADMIN_404_ACTION_1.$GLOBALS['what'].ADMIN_404_ACTION_2); } // diff --git a/inc/modules/admin/action-user.php b/inc/modules/admin/action-user.php index ba5a009c39..3971d4304d 100644 --- a/inc/modules/admin/action-user.php +++ b/inc/modules/admin/action-user.php @@ -46,7 +46,7 @@ if (FILE_READABLE($INC)) { // Ok, we finally load the admin action module include($INC); } else { - ADD_FATAL(ADMIN_404_ACTION_1.$GLOBALS['what'].ADMIN_404_ACTION_2); + addFatalMessage(ADMIN_404_ACTION_1.$GLOBALS['what'].ADMIN_404_ACTION_2); } // diff --git a/inc/modules/admin/action-wernis.php b/inc/modules/admin/action-wernis.php index 65a75c8b68..c38971934b 100644 --- a/inc/modules/admin/action-wernis.php +++ b/inc/modules/admin/action-wernis.php @@ -46,7 +46,7 @@ if (FILE_READABLE($INC)) { // Ok, we finally load the admin action module include($INC); } else { - ADD_FATAL(ADMIN_404_ACTION_1.$GLOBALS['what'].ADMIN_404_ACTION_2); + addFatalMessage(ADMIN_404_ACTION_1.$GLOBALS['what'].ADMIN_404_ACTION_2); } // diff --git a/inc/modules/admin/admin-inc.php b/inc/modules/admin/admin-inc.php index af97f70378..fe98128a1e 100644 --- a/inc/modules/admin/admin-inc.php +++ b/inc/modules/admin/admin-inc.php @@ -356,16 +356,16 @@ LIMIT 1", array($act, $wht, $wht), __FILE__, __LINE__); } elseif (__ACL_ALLOW == false) { // Access denied LOAD_TEMPLATE("admin_menu_failed", false, ADMIN_ACCESS_DENIED); - ADD_FATAL(ADMIN_ACCESS_DENIED); + addFatalMessage(ADMIN_ACCESS_DENIED); } else { // Include file not found! :-( LOAD_TEMPLATE("admin_menu_failed", false, ADMIN_404_ACTION); - ADD_FATAL(ADMIN_404_ACTION_1.$act.ADMIN_404_ACTION_2); + addFatalMessage(ADMIN_404_ACTION_1.$act.ADMIN_404_ACTION_2); } } else { // Invalid action/what pair found! LOAD_TEMPLATE("admin_menu_failed", false, ADMIN_INVALID_ACTION); - ADD_FATAL(ADMIN_INVALID_ACTION_1.$act."/".$wht.ADMIN_INVALID_ACTION_2); + addFatalMessage(ADMIN_INVALID_ACTION_1.$act."/".$wht.ADMIN_INVALID_ACTION_2); } // Free memory diff --git a/inc/modules/admin/what-config_other.php b/inc/modules/admin/what-config_other.php index 3b6d1266a0..9b79974df7 100644 --- a/inc/modules/admin/what-config_other.php +++ b/inc/modules/admin/what-config_other.php @@ -37,7 +37,7 @@ if ((!defined('__SECURITY')) || (!IS_ADMIN())) { require($INC); } elseif ((!EXT_IS_ACTIVE("other")) || (GET_EXT_VERSION("other") == "")) { // Missing extension! - ADD_FATAL(sprintf(EXTENSION_PROBLEM_NOT_INSTALLED, "other")); + addFatalMessage(sprintf(EXTENSION_PROBLEM_NOT_INSTALLED, "other")); return; } diff --git a/inc/modules/admin/what-config_yoomedia.php b/inc/modules/admin/what-config_yoomedia.php index b50caf3a30..f196a2838c 100644 --- a/inc/modules/admin/what-config_yoomedia.php +++ b/inc/modules/admin/what-config_yoomedia.php @@ -36,7 +36,7 @@ if ((!defined('__SECURITY')) || (!IS_ADMIN())) { $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php"; require($INC); } elseif (!EXT_IS_ACTIVE("yoomedia")) { - ADD_FATAL(EXTENSION_PROBLEM_EXT_INACTIVE, "yoomedia"); + addFatalMessage(EXTENSION_PROBLEM_EXT_INACTIVE, "yoomedia"); return; } diff --git a/inc/modules/admin/what-del_task.php b/inc/modules/admin/what-del_task.php index 7212e1ecee..3aa851bf1a 100644 --- a/inc/modules/admin/what-del_task.php +++ b/inc/modules/admin/what-del_task.php @@ -36,7 +36,7 @@ if ((!defined('__SECURITY')) || (!IS_ADMIN())) { $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php"; require($INC); } elseif (!EXT_IS_ACTIVE("task")) { - ADD_FATAL(EXTENSION_PROBLEM_EXT_INACTIVE, "task"); + addFatalMessage(EXTENSION_PROBLEM_EXT_INACTIVE, "task"); return; } diff --git a/inc/modules/admin/what-list_links.php b/inc/modules/admin/what-list_links.php index 18848922d9..2b81e0620a 100644 --- a/inc/modules/admin/what-list_links.php +++ b/inc/modules/admin/what-list_links.php @@ -36,7 +36,7 @@ if ((!defined('__SECURITY')) || (!IS_ADMIN())) { $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php"; require($INC); } elseif (!EXT_IS_ACTIVE("mailid")) { - ADD_FATAL(sprintf(EXTENSION_PROBLEM_NOT_INSTALLED, "mailid")); + addFatalMessage(sprintf(EXTENSION_PROBLEM_NOT_INSTALLED, "mailid")); return; } diff --git a/inc/modules/admin/what-list_task.php b/inc/modules/admin/what-list_task.php index b9a66f3e4b..8370a1c19d 100644 --- a/inc/modules/admin/what-list_task.php +++ b/inc/modules/admin/what-list_task.php @@ -36,7 +36,7 @@ if ((!defined('__SECURITY')) || (!IS_ADMIN())) { $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php"; require($INC); } elseif (!EXT_IS_ACTIVE("task")) { - ADD_FATAL(EXTENSION_PROBLEM_EXT_INACTIVE, "task"); + addFatalMessage(EXTENSION_PROBLEM_EXT_INACTIVE, "task"); return; } diff --git a/inc/modules/admin/what-list_unconfirmed.php b/inc/modules/admin/what-list_unconfirmed.php index 86bf30742b..a6bdba6c38 100644 --- a/inc/modules/admin/what-list_unconfirmed.php +++ b/inc/modules/admin/what-list_unconfirmed.php @@ -36,7 +36,7 @@ if ((!defined('__SECURITY')) || (!IS_ADMIN())) { $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php"; require($INC); } elseif (!EXT_IS_ACTIVE("mailid")) { - ADD_FATAL(sprintf(EXTENSION_PROBLEM_NOT_INSTALLED, "mailid")); + addFatalMessage(sprintf(EXTENSION_PROBLEM_NOT_INSTALLED, "mailid")); return; } diff --git a/inc/modules/admin/what-list_user.php b/inc/modules/admin/what-list_user.php index 95e3d7172b..9b15ec8843 100644 --- a/inc/modules/admin/what-list_user.php +++ b/inc/modules/admin/what-list_user.php @@ -37,7 +37,7 @@ if ((!defined('__SECURITY')) || (!IS_ADMIN())) { require($INC); } elseif ((!EXT_IS_ACTIVE("user")) || (GET_EXT_VERSION("user") == "")) { // Missing extension! - ADD_FATAL(sprintf(EXTENSION_PROBLEM_NOT_INSTALLED, "user")); + addFatalMessage(sprintf(EXTENSION_PROBLEM_NOT_INSTALLED, "user")); return; } diff --git a/inc/modules/admin/what-list_yoomedia_tm.php b/inc/modules/admin/what-list_yoomedia_tm.php index 1e9e49e317..67c9db27b6 100644 --- a/inc/modules/admin/what-list_yoomedia_tm.php +++ b/inc/modules/admin/what-list_yoomedia_tm.php @@ -35,10 +35,10 @@ if ((!defined('__SECURITY')) || (!IS_ADMIN())) { $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4)."/security.php"; require($INC); } elseif (!EXT_IS_ACTIVE("yoomedia")) { - ADD_FATAL(EXTENSION_PROBLEM_EXT_INACTIVE, "yoomedia"); + addFatalMessage(EXTENSION_PROBLEM_EXT_INACTIVE, "yoomedia"); return; } elseif (!EXT_IS_ACTIVE("bonus")) { - ADD_FATAL(EXTENSION_PROBLEM_EXT_INACTIVE, "bonus"); + addFatalMessage(EXTENSION_PROBLEM_EXT_INACTIVE, "bonus"); return; } diff --git a/inc/modules/admin/what-overview.php b/inc/modules/admin/what-overview.php index 965ac2be33..83e1660d25 100644 --- a/inc/modules/admin/what-overview.php +++ b/inc/modules/admin/what-overview.php @@ -61,7 +61,7 @@ if ($GLOBALS['action'] == "login") { // Are there jobs to be done? if ($JOBS_DONE) { // Generate overview of all main menus - global $menuDesription, $FATAL; + global $menuDesription; if ((is_array($menuDesription)) && (sizeof($menuDesription) > 0)) { $OUT = ""; foreach ($menuDesription as $key => $value) diff --git a/inc/modules/admin/what-send_bonus.php b/inc/modules/admin/what-send_bonus.php index 0d4a1f6058..583d7eb15e 100644 --- a/inc/modules/admin/what-send_bonus.php +++ b/inc/modules/admin/what-send_bonus.php @@ -36,7 +36,7 @@ if ((!defined('__SECURITY')) || (!IS_ADMIN())) { $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php"; require($INC); } elseif (!EXT_IS_ACTIVE("order")) { - ADD_FATAL(sprintf(EXTENSION_PROBLEM_NOT_INSTALLED, "order")); + addFatalMessage(sprintf(EXTENSION_PROBLEM_NOT_INSTALLED, "order")); return; } diff --git a/inc/modules/admin/what-theme_edit.php b/inc/modules/admin/what-theme_edit.php index f69e0a4da2..ef64b51412 100644 --- a/inc/modules/admin/what-theme_edit.php +++ b/inc/modules/admin/what-theme_edit.php @@ -36,7 +36,7 @@ if ((!defined('__SECURITY')) || (!IS_ADMIN())) { $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php"; require($INC); } elseif (!EXT_IS_ACTIVE("theme")) { - ADD_FATAL(sprintf(EXTENSION_PROBLEM_NOT_INSTALLED, "theme")); + addFatalMessage(sprintf(EXTENSION_PROBLEM_NOT_INSTALLED, "theme")); return; } diff --git a/inc/modules/admin/what-theme_import.php b/inc/modules/admin/what-theme_import.php index 1df771d2cf..871e94ac42 100644 --- a/inc/modules/admin/what-theme_import.php +++ b/inc/modules/admin/what-theme_import.php @@ -36,7 +36,7 @@ if ((!defined('__SECURITY')) || (!IS_ADMIN())) { $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php"; require($INC); } elseif (!EXT_IS_ACTIVE("theme")) { - ADD_FATAL(sprintf(EXTENSION_PROBLEM_NOT_INSTALLED, "theme")); + addFatalMessage(sprintf(EXTENSION_PROBLEM_NOT_INSTALLED, "theme")); return; } diff --git a/inc/modules/guest/action- b/inc/modules/guest/action- index 6b8b39bc5d..a1eb5eb9e4 100644 --- a/inc/modules/guest/action- +++ b/inc/modules/guest/action- @@ -36,7 +36,7 @@ if (!defined('__SECURITY')) { $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php"; require($INC); } elseif ((!EXT_IS_ACTIVE("")) && (!IS_ADMIN())) { - ADD_FATAL(EXTENSION_PROBLEM_EXT_INACTIVE, ""); + addFatalMessage(EXTENSION_PROBLEM_EXT_INACTIVE, ""); return; } elseif ($BLOCK_MODE) { // Block mode detected @@ -52,9 +52,9 @@ if (FILE_READABLE($INC)) { // Ok, we finally load the guest action module include($INC); } elseif ($IS_VALID) { - ADD_FATAL(sprintf(getMessage('GUEST_404_ACTION'), SQL_ESCAPE($GLOBALS['what']))); + addFatalMessage(sprintf(getMessage('GUEST_404_ACTION'), SQL_ESCAPE($GLOBALS['what']))); } else { - ADD_FATAL(sprintf(getMessage('GUEST_LOCKED_ACTION'), SQL_ESCAPE($GLOBALS['what']))); + addFatalMessage(sprintf(getMessage('GUEST_LOCKED_ACTION'), SQL_ESCAPE($GLOBALS['what']))); } // diff --git a/inc/modules/guest/action-admin.php b/inc/modules/guest/action-admin.php index efbbf18c97..5d3416a663 100644 --- a/inc/modules/guest/action-admin.php +++ b/inc/modules/guest/action-admin.php @@ -46,9 +46,9 @@ if (FILE_READABLE($INC)) { // Ok, we finally load the guest action module include($INC); } elseif ($IS_VALID) { - ADD_FATAL(sprintf(getMessage('GUEST_404_ACTION'), SQL_ESCAPE($GLOBALS['what']))); + addFatalMessage(sprintf(getMessage('GUEST_404_ACTION'), SQL_ESCAPE($GLOBALS['what']))); } else { - ADD_FATAL(sprintf(getMessage('GUEST_LOCKED_ACTION'), SQL_ESCAPE($GLOBALS['what']))); + addFatalMessage(sprintf(getMessage('GUEST_LOCKED_ACTION'), SQL_ESCAPE($GLOBALS['what']))); } // diff --git a/inc/modules/guest/action-main.php b/inc/modules/guest/action-main.php index 94592b2f4f..87d77a9846 100644 --- a/inc/modules/guest/action-main.php +++ b/inc/modules/guest/action-main.php @@ -51,9 +51,9 @@ if ((FILE_READABLE($INC)) && ($IS_VALID)) { // Ok, we finally load the guest action module require_once($INC); } elseif ($IS_VALID) { - ADD_FATAL(sprintf(getMessage('GUEST_404_ACTION'), SQL_ESCAPE($GLOBALS['what']))); + addFatalMessage(sprintf(getMessage('GUEST_404_ACTION'), SQL_ESCAPE($GLOBALS['what']))); } else { - ADD_FATAL(sprintf(getMessage('GUEST_LOCKED_ACTION'), SQL_ESCAPE($GLOBALS['what']))); + addFatalMessage(sprintf(getMessage('GUEST_LOCKED_ACTION'), SQL_ESCAPE($GLOBALS['what']))); } // diff --git a/inc/modules/guest/action-members.php b/inc/modules/guest/action-members.php index 78362718dc..c24c213ab9 100644 --- a/inc/modules/guest/action-members.php +++ b/inc/modules/guest/action-members.php @@ -49,9 +49,9 @@ if (FILE_READABLE($INC)) { // Ok, we finally load the guest action module include($INC); } elseif ($IS_VALID) { - ADD_FATAL(sprintf(getMessage('GUEST_404_ACTION'), SQL_ESCAPE($GLOBALS['what']))); + addFatalMessage(sprintf(getMessage('GUEST_404_ACTION'), SQL_ESCAPE($GLOBALS['what']))); } else { - ADD_FATAL(sprintf(getMessage('GUEST_LOCKED_ACTION'), SQL_ESCAPE($GLOBALS['what']))); + addFatalMessage(sprintf(getMessage('GUEST_LOCKED_ACTION'), SQL_ESCAPE($GLOBALS['what']))); } // diff --git a/inc/modules/guest/action-sponsor.php b/inc/modules/guest/action-sponsor.php index df18e40597..323eea8bf1 100644 --- a/inc/modules/guest/action-sponsor.php +++ b/inc/modules/guest/action-sponsor.php @@ -35,7 +35,7 @@ if (!defined('__SECURITY')) { $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4)."/security.php"; require($INC); } elseif ((!EXT_IS_ACTIVE("sponsor")) && (!IS_ADMIN())) { - ADD_FATAL(EXTENSION_PROBLEM_EXT_INACTIVE, "sponsor"); + addFatalMessage(EXTENSION_PROBLEM_EXT_INACTIVE, "sponsor"); return; } elseif ($BLOCK_MODE) { // Block mode detected @@ -51,9 +51,9 @@ if (FILE_READABLE($INC)) { // Ok, we finally load the guest action module include($INC); } elseif ($IS_VALID) { - ADD_FATAL(sprintf(getMessage('GUEST_404_ACTION'), SQL_ESCAPE($GLOBALS['what']))); + addFatalMessage(sprintf(getMessage('GUEST_404_ACTION'), SQL_ESCAPE($GLOBALS['what']))); } else { - ADD_FATAL(sprintf(getMessage('GUEST_LOCKED_ACTION'), SQL_ESCAPE($GLOBALS['what']))); + addFatalMessage(sprintf(getMessage('GUEST_LOCKED_ACTION'), SQL_ESCAPE($GLOBALS['what']))); } // diff --git a/inc/modules/guest/action-themes.php b/inc/modules/guest/action-themes.php index 8bbac22d46..810f1ab52b 100644 --- a/inc/modules/guest/action-themes.php +++ b/inc/modules/guest/action-themes.php @@ -36,7 +36,7 @@ if (!defined('__SECURITY')) { $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php"; require($INC); } elseif ((!EXT_IS_ACTIVE("theme")) && (!IS_ADMIN())) { - ADD_FATAL(EXTENSION_PROBLEM_EXT_INACTIVE, "theme"); + addFatalMessage(EXTENSION_PROBLEM_EXT_INACTIVE, "theme"); return; } diff --git a/inc/modules/guest/what-active.php b/inc/modules/guest/what-active.php index ba45f0cc7a..724810e1db 100644 --- a/inc/modules/guest/what-active.php +++ b/inc/modules/guest/what-active.php @@ -36,7 +36,7 @@ if (!defined('__SECURITY')) { $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php"; require($INC); } elseif ((!EXT_IS_ACTIVE("active")) && (!IS_ADMIN())) { - ADD_FATAL(EXTENSION_PROBLEM_EXT_INACTIVE, "active"); + addFatalMessage(EXTENSION_PROBLEM_EXT_INACTIVE, "active"); return; } diff --git a/inc/modules/guest/what-beg.php b/inc/modules/guest/what-beg.php index 88b8d4695e..d61d0d0671 100644 --- a/inc/modules/guest/what-beg.php +++ b/inc/modules/guest/what-beg.php @@ -36,7 +36,7 @@ if (!defined('__SECURITY')) { $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php"; require($INC); } elseif ((!EXT_IS_ACTIVE("beg")) && (!IS_ADMIN())) { - ADD_FATAL(EXTENSION_PROBLEM_EXT_INACTIVE, "beg"); + addFatalMessage(EXTENSION_PROBLEM_EXT_INACTIVE, "beg"); return; } diff --git a/inc/modules/guest/what-doubler.php b/inc/modules/guest/what-doubler.php index b50ddca2a7..71cfbdd73e 100644 --- a/inc/modules/guest/what-doubler.php +++ b/inc/modules/guest/what-doubler.php @@ -36,7 +36,7 @@ if (!defined('__SECURITY')) { $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php"; require($INC); } elseif ((!EXT_IS_ACTIVE("doubler")) && (!IS_ADMIN())) { - ADD_FATAL(EXTENSION_PROBLEM_EXT_INACTIVE, "doubler"); + addFatalMessage(EXTENSION_PROBLEM_EXT_INACTIVE, "doubler"); return; } diff --git a/inc/modules/guest/what-login.php b/inc/modules/guest/what-login.php index 6b108994f6..23d2f9df8b 100644 --- a/inc/modules/guest/what-login.php +++ b/inc/modules/guest/what-login.php @@ -37,7 +37,7 @@ if (!defined('__SECURITY')) { $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php"; require($INC); } elseif ((!EXT_IS_ACTIVE("user")) && (!IS_ADMIN())) { - ADD_FATAL(EXTENSION_PROBLEM_EXT_INACTIVE, "user"); + addFatalMessage(EXTENSION_PROBLEM_EXT_INACTIVE, "user"); return; } @@ -162,8 +162,7 @@ if (EXT_IS_ACTIVE("nickname")) { // Was an URL constructed? if (!empty($URL)) { // URL was constructed - global $FATAL; - if (!empty($FATAL[0])) { + if (getTotalFatalErrorMessages()) { // Fatal errors! require_once(PATH."inc/fatal_errors.php"); } else { diff --git a/inc/modules/guest/what-mediadata.php b/inc/modules/guest/what-mediadata.php index e2f2fabaf7..0d0b12a4dd 100644 --- a/inc/modules/guest/what-mediadata.php +++ b/inc/modules/guest/what-mediadata.php @@ -39,7 +39,7 @@ if (!defined('__SECURITY')) { $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php"; require($INC); } elseif ((!EXT_IS_ACTIVE("mediadata")) && (!IS_ADMIN())) { - ADD_FATAL(EXTENSION_PROBLEM_EXT_INACTIVE, "mediadata"); + addFatalMessage(EXTENSION_PROBLEM_EXT_INACTIVE, "mediadata"); return; } diff --git a/inc/modules/guest/what-rallyes.php b/inc/modules/guest/what-rallyes.php index edf07850d4..fc616fb5ac 100644 --- a/inc/modules/guest/what-rallyes.php +++ b/inc/modules/guest/what-rallyes.php @@ -36,7 +36,7 @@ if (!defined('__SECURITY')) { $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php"; require($INC); } elseif ((!EXT_IS_ACTIVE("rallye")) && (!IS_ADMIN())) { - ADD_FATAL(EXTENSION_PROBLEM_EXT_INACTIVE, "rallye"); + addFatalMessage(EXTENSION_PROBLEM_EXT_INACTIVE, "rallye"); return; } diff --git a/inc/modules/guest/what-register.php b/inc/modules/guest/what-register.php index b7f3948965..f17a36cb82 100644 --- a/inc/modules/guest/what-register.php +++ b/inc/modules/guest/what-register.php @@ -37,9 +37,9 @@ if (!defined('__SECURITY')) { require($INC); } elseif ((!EXT_IS_ACTIVE("register"))) { if (IS_ADMIN()) { - ADD_FATAL(sprintf(EXTENSION_PROBLEM_NOT_INSTALLED, "register")); + addFatalMessage(sprintf(EXTENSION_PROBLEM_NOT_INSTALLED, "register")); } else { - ADD_FATAL(EXTENSION_PROBLEM_EXT_INACTIVE, "register"); + addFatalMessage(EXTENSION_PROBLEM_EXT_INACTIVE, "register"); } return; } diff --git a/inc/modules/guest/what-sponsor_agb.php b/inc/modules/guest/what-sponsor_agb.php index ec291ec77a..6697f1ee9a 100644 --- a/inc/modules/guest/what-sponsor_agb.php +++ b/inc/modules/guest/what-sponsor_agb.php @@ -36,9 +36,9 @@ if (!defined('__SECURITY')) { require($INC); } elseif ((!EXT_IS_ACTIVE("sponsor"))) { if (IS_ADMIN()) { - ADD_FATAL(sprintf(EXTENSION_PROBLEM_NOT_INSTALLED, "sponsor")); + addFatalMessage(sprintf(EXTENSION_PROBLEM_NOT_INSTALLED, "sponsor")); } else { - ADD_FATAL(EXTENSION_PROBLEM_EXT_INACTIVE, "sponsor"); + addFatalMessage(EXTENSION_PROBLEM_EXT_INACTIVE, "sponsor"); } return; } diff --git a/inc/modules/guest/what-sponsor_infos.php b/inc/modules/guest/what-sponsor_infos.php index 39cf47fe7e..f172a5abfc 100644 --- a/inc/modules/guest/what-sponsor_infos.php +++ b/inc/modules/guest/what-sponsor_infos.php @@ -36,9 +36,9 @@ if (!defined('__SECURITY')) { require($INC); } elseif ((!EXT_IS_ACTIVE("sponsor"))) { if (IS_ADMIN()) { - ADD_FATAL(sprintf(EXTENSION_PROBLEM_NOT_INSTALLED, "sponsor")); + addFatalMessage(sprintf(EXTENSION_PROBLEM_NOT_INSTALLED, "sponsor")); } else { - ADD_FATAL(EXTENSION_PROBLEM_EXT_INACTIVE, "sponsor"); + addFatalMessage(EXTENSION_PROBLEM_EXT_INACTIVE, "sponsor"); } return; } diff --git a/inc/modules/guest/what-sponsor_login.php b/inc/modules/guest/what-sponsor_login.php index 2f7ed2aebd..c175a55b8b 100644 --- a/inc/modules/guest/what-sponsor_login.php +++ b/inc/modules/guest/what-sponsor_login.php @@ -36,9 +36,9 @@ if (!defined('__SECURITY')) { require($INC); } elseif ((!EXT_IS_ACTIVE("sponsor"))) { if (IS_ADMIN()) { - ADD_FATAL(sprintf(EXTENSION_PROBLEM_NOT_INSTALLED, "sponsor")); + addFatalMessage(sprintf(EXTENSION_PROBLEM_NOT_INSTALLED, "sponsor")); } else { - ADD_FATAL(EXTENSION_PROBLEM_EXT_INACTIVE, "sponsor"); + addFatalMessage(EXTENSION_PROBLEM_EXT_INACTIVE, "sponsor"); } return; } diff --git a/inc/modules/guest/what-sponsor_reg.php b/inc/modules/guest/what-sponsor_reg.php index 7060952e9d..cb67895a30 100644 --- a/inc/modules/guest/what-sponsor_reg.php +++ b/inc/modules/guest/what-sponsor_reg.php @@ -36,9 +36,9 @@ if (!defined('__SECURITY')) { require($INC); } elseif ((!EXT_IS_ACTIVE("sponsor"))) { if (IS_ADMIN()) { - ADD_FATAL(sprintf(EXTENSION_PROBLEM_NOT_INSTALLED, "sponsor")); + addFatalMessage(sprintf(EXTENSION_PROBLEM_NOT_INSTALLED, "sponsor")); } else { - ADD_FATAL(EXTENSION_PROBLEM_EXT_INACTIVE, "sponsor"); + addFatalMessage(EXTENSION_PROBLEM_EXT_INACTIVE, "sponsor"); } return; } diff --git a/inc/modules/guest/what-top10.php b/inc/modules/guest/what-top10.php index 5259cdf1e6..56c36548f7 100644 --- a/inc/modules/guest/what-top10.php +++ b/inc/modules/guest/what-top10.php @@ -36,7 +36,7 @@ if (!defined('__SECURITY')) { $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php"; require($INC); } elseif ((!EXT_IS_ACTIVE("top10")) && (!IS_ADMIN())) { - ADD_FATAL(EXTENSION_PROBLEM_EXT_INACTIVE, "top10"); + addFatalMessage(EXTENSION_PROBLEM_EXT_INACTIVE, "top10"); return; } diff --git a/inc/modules/guest/what-wernis_portal.php b/inc/modules/guest/what-wernis_portal.php index fa37e33663..eb6491c642 100644 --- a/inc/modules/guest/what-wernis_portal.php +++ b/inc/modules/guest/what-wernis_portal.php @@ -36,7 +36,7 @@ if (!defined('__SECURITY')) { $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php"; require($INC); } elseif ((!EXT_IS_ACTIVE("wernis")) && (!IS_ADMIN())) { - ADD_FATAL(EXTENSION_PROBLEM_EXT_INACTIVE, "wernis"); + addFatalMessage(EXTENSION_PROBLEM_EXT_INACTIVE, "wernis"); return; } diff --git a/inc/modules/member/action- b/inc/modules/member/action- index 9f305f19f2..fdb3590d34 100644 --- a/inc/modules/member/action- +++ b/inc/modules/member/action- @@ -38,7 +38,7 @@ if (!defined('__SECURITY')) { } elseif (!IS_LOGGED_IN()) { LOAD_URL(URL."/modules.php?module=index"); } elseif ((!EXT_IS_ACTIVE("")) && (!IS_ADMIN())) { - ADD_FATAL(EXTENSION_PROBLEM_EXT_INACTIVE, ""); + addFatalMessage(EXTENSION_PROBLEM_EXT_INACTIVE, ""); return; } elseif ($BLOCK_MODE) { // Block mode detected @@ -54,7 +54,7 @@ if (FILE_READABLE($INC_WHAT)) { // Ok, we finally load the member action module include_once($INC_WHAT); } else { - ADD_FATAL(MEMBER_404_ACTION_1.$GLOBALS['what'].MEMBER_404_ACTION_2); + addFatalMessage(MEMBER_404_ACTION_1.$GLOBALS['what'].MEMBER_404_ACTION_2); } // diff --git a/inc/modules/member/action-account.php b/inc/modules/member/action-account.php index 91e746e096..8f169ece40 100644 --- a/inc/modules/member/action-account.php +++ b/inc/modules/member/action-account.php @@ -51,7 +51,7 @@ if (FILE_READABLE($INC_WHAT)) { // Ok, we finally load the member action module include_once($INC_WHAT); } else { - ADD_FATAL(MEMBER_404_ACTION_1.$GLOBALS['what'].MEMBER_404_ACTION_2); + addFatalMessage(MEMBER_404_ACTION_1.$GLOBALS['what'].MEMBER_404_ACTION_2); } // diff --git a/inc/modules/member/action-bank.php b/inc/modules/member/action-bank.php index d334432548..b3fd7f4e0c 100644 --- a/inc/modules/member/action-bank.php +++ b/inc/modules/member/action-bank.php @@ -38,7 +38,7 @@ if (!defined('__SECURITY')) { } elseif (!IS_MEMBER()) { LOAD_URL("modules.php?module=index"); } elseif ((!EXT_IS_ACTIVE("bank")) && (!IS_ADMIN())) { - ADD_FATAL(EXTENSION_PROBLEM_EXT_INACTIVE, "bank"); + addFatalMessage(EXTENSION_PROBLEM_EXT_INACTIVE, "bank"); return; } elseif ($BLOCK_MODE) { // Block mode detected @@ -54,7 +54,7 @@ if (FILE_READABLE($INC_WHAT)) { // Ok, we finally load the member action module include_once($INC_WHAT); } else { - ADD_FATAL(MEMBER_404_ACTION_1.$GLOBALS['what'].MEMBER_404_ACTION_2); + addFatalMessage(MEMBER_404_ACTION_1.$GLOBALS['what'].MEMBER_404_ACTION_2); } // diff --git a/inc/modules/member/action-extras.php b/inc/modules/member/action-extras.php index 89cdbb859c..0badee216a 100644 --- a/inc/modules/member/action-extras.php +++ b/inc/modules/member/action-extras.php @@ -51,7 +51,7 @@ if (FILE_READABLE($INC_WHAT)) { // Ok, we finally load the member action module include_once($INC_WHAT); } else { - ADD_FATAL(MEMBER_404_ACTION_1.$GLOBALS['what'].MEMBER_404_ACTION_2); + addFatalMessage(MEMBER_404_ACTION_1.$GLOBALS['what'].MEMBER_404_ACTION_2); } // diff --git a/inc/modules/member/action-logout.php b/inc/modules/member/action-logout.php index 8c2867af95..74945d10ee 100644 --- a/inc/modules/member/action-logout.php +++ b/inc/modules/member/action-logout.php @@ -51,7 +51,7 @@ if (FILE_READABLE($INC_WHAT)) { // Ok, we finally load the member action module include_once($INC_WHAT); } else { - ADD_FATAL(MEMBER_404_ACTION_1.$GLOBALS['what'].MEMBER_404_ACTION_2); + addFatalMessage(MEMBER_404_ACTION_1.$GLOBALS['what'].MEMBER_404_ACTION_2); } // diff --git a/inc/modules/member/action-main.php b/inc/modules/member/action-main.php index 24359aa6fd..e280b75340 100644 --- a/inc/modules/member/action-main.php +++ b/inc/modules/member/action-main.php @@ -51,7 +51,7 @@ if (FILE_READABLE($INC_WHAT)) { // Ok, we finally load the member action module include_once($INC_WHAT); } else { - ADD_FATAL(MEMBER_404_ACTION_1.$GLOBALS['what'].MEMBER_404_ACTION_2); + addFatalMessage(MEMBER_404_ACTION_1.$GLOBALS['what'].MEMBER_404_ACTION_2); } // diff --git a/inc/modules/member/action-order.php b/inc/modules/member/action-order.php index b546a774da..6c327f2568 100644 --- a/inc/modules/member/action-order.php +++ b/inc/modules/member/action-order.php @@ -38,7 +38,7 @@ if (!defined('__SECURITY')) { } elseif (!IS_MEMBER()) { LOAD_URL("modules.php?module=index"); } elseif ((!EXT_IS_ACTIVE("order")) && (!IS_ADMIN())) { - ADD_FATAL(EXTENSION_PROBLEM_EXT_INACTIVE, "order"); + addFatalMessage(EXTENSION_PROBLEM_EXT_INACTIVE, "order"); return; } elseif ($BLOCK_MODE) { // Block mode detected @@ -54,7 +54,7 @@ if (FILE_READABLE($INC_WHAT)) { // Ok, we finally load the member action module include_once($INC_WHAT); } else { - ADD_FATAL(MEMBER_404_ACTION_1.$GLOBALS['what'].MEMBER_404_ACTION_2); + addFatalMessage(MEMBER_404_ACTION_1.$GLOBALS['what'].MEMBER_404_ACTION_2); } // diff --git a/inc/modules/member/action-rals.php b/inc/modules/member/action-rals.php index 07465dfbde..b562617d6e 100644 --- a/inc/modules/member/action-rals.php +++ b/inc/modules/member/action-rals.php @@ -51,7 +51,7 @@ if (FILE_READABLE($INC_WHAT)) { // Ok, we finally load the member action module include_once($INC_WHAT); } else { - ADD_FATAL(MEMBER_404_ACTION_1.$GLOBALS['what'].MEMBER_404_ACTION_2); + addFatalMessage(MEMBER_404_ACTION_1.$GLOBALS['what'].MEMBER_404_ACTION_2); } // diff --git a/inc/modules/member/action-stats.php b/inc/modules/member/action-stats.php index a60ad4ba0c..bd22b44803 100644 --- a/inc/modules/member/action-stats.php +++ b/inc/modules/member/action-stats.php @@ -51,7 +51,7 @@ if (FILE_READABLE($INC_WHAT)) { // Ok, we finally load the member action module include_once($INC_WHAT); } else { - ADD_FATAL(MEMBER_404_ACTION_1.$GLOBALS['what'].MEMBER_404_ACTION_2); + addFatalMessage(MEMBER_404_ACTION_1.$GLOBALS['what'].MEMBER_404_ACTION_2); } // diff --git a/inc/modules/member/action-surfbar.php b/inc/modules/member/action-surfbar.php index 163bd496f8..4cfdee5811 100644 --- a/inc/modules/member/action-surfbar.php +++ b/inc/modules/member/action-surfbar.php @@ -38,7 +38,7 @@ if (!defined('__SECURITY')) { } elseif (!IS_MEMBER()) { LOAD_URL("modules.php?module=index"); } elseif ((!EXT_IS_ACTIVE("surfbar")) && (!IS_ADMIN())) { - ADD_FATAL(EXTENSION_PROBLEM_EXT_INACTIVE, "surfbar"); + addFatalMessage(EXTENSION_PROBLEM_EXT_INACTIVE, "surfbar"); return; } elseif ($BLOCK_MODE) { // Block mode detected @@ -54,7 +54,7 @@ if (FILE_READABLE($INC_WHAT)) { // Ok, we finally load the member action module include_once($INC_WHAT); } else { - ADD_FATAL(MEMBER_404_ACTION_1.$GLOBALS['what'].MEMBER_404_ACTION_2); + addFatalMessage(MEMBER_404_ACTION_1.$GLOBALS['what'].MEMBER_404_ACTION_2); } // diff --git a/inc/modules/member/action-themes.php b/inc/modules/member/action-themes.php index c06b4d9b21..9e39e3e1f8 100644 --- a/inc/modules/member/action-themes.php +++ b/inc/modules/member/action-themes.php @@ -38,7 +38,7 @@ if (!defined('__SECURITY')) { } elseif (!IS_MEMBER()) { LOAD_URL("modules.php?module=index"); } elseif ((!EXT_IS_ACTIVE("theme")) && (!IS_ADMIN())) { - ADD_FATAL(EXTENSION_PROBLEM_EXT_INACTIVE, "theme"); + addFatalMessage(EXTENSION_PROBLEM_EXT_INACTIVE, "theme"); return; } diff --git a/inc/modules/member/what-bank_create.php b/inc/modules/member/what-bank_create.php index fc9288fe53..31bbf4c3c9 100644 --- a/inc/modules/member/what-bank_create.php +++ b/inc/modules/member/what-bank_create.php @@ -36,7 +36,7 @@ if (!defined('__SECURITY')) { $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php"; require($INC); } elseif ((!EXT_IS_ACTIVE("bank")) && (!IS_ADMIN())) { - ADD_FATAL(EXTENSION_PROBLEM_EXT_INACTIVE, "bank"); + addFatalMessage(EXTENSION_PROBLEM_EXT_INACTIVE, "bank"); return; } elseif (!IS_MEMBER()) { LOAD_URL("modules.php?module=index"); diff --git a/inc/modules/member/what-bank_deposit.php b/inc/modules/member/what-bank_deposit.php index 7012c64f82..1344403fa0 100644 --- a/inc/modules/member/what-bank_deposit.php +++ b/inc/modules/member/what-bank_deposit.php @@ -38,7 +38,7 @@ if (!defined('__SECURITY')) { } elseif (!IS_MEMBER()) { LOAD_URL("modules.php?module=index"); } elseif ((!EXT_IS_ACTIVE("bank")) && (!IS_ADMIN())) { - ADD_FATAL(EXTENSION_PROBLEM_EXT_INACTIVE, "bank"); + addFatalMessage(EXTENSION_PROBLEM_EXT_INACTIVE, "bank"); return; } diff --git a/inc/modules/member/what-bank_infos.php b/inc/modules/member/what-bank_infos.php index c622b560df..d9915dffaf 100644 --- a/inc/modules/member/what-bank_infos.php +++ b/inc/modules/member/what-bank_infos.php @@ -38,7 +38,7 @@ if (!defined('__SECURITY')) { } elseif (!IS_MEMBER()) { LOAD_URL("modules.php?module=index"); } elseif ((!EXT_IS_ACTIVE("bank")) && (!IS_ADMIN())) { - ADD_FATAL(EXTENSION_PROBLEM_EXT_INACTIVE, "bank"); + addFatalMessage(EXTENSION_PROBLEM_EXT_INACTIVE, "bank"); return; } diff --git a/inc/modules/member/what-bank_output.php b/inc/modules/member/what-bank_output.php index c622b560df..d9915dffaf 100644 --- a/inc/modules/member/what-bank_output.php +++ b/inc/modules/member/what-bank_output.php @@ -38,7 +38,7 @@ if (!defined('__SECURITY')) { } elseif (!IS_MEMBER()) { LOAD_URL("modules.php?module=index"); } elseif ((!EXT_IS_ACTIVE("bank")) && (!IS_ADMIN())) { - ADD_FATAL(EXTENSION_PROBLEM_EXT_INACTIVE, "bank"); + addFatalMessage(EXTENSION_PROBLEM_EXT_INACTIVE, "bank"); return; } diff --git a/inc/modules/member/what-bank_withdraw.php b/inc/modules/member/what-bank_withdraw.php index c622b560df..d9915dffaf 100644 --- a/inc/modules/member/what-bank_withdraw.php +++ b/inc/modules/member/what-bank_withdraw.php @@ -38,7 +38,7 @@ if (!defined('__SECURITY')) { } elseif (!IS_MEMBER()) { LOAD_URL("modules.php?module=index"); } elseif ((!EXT_IS_ACTIVE("bank")) && (!IS_ADMIN())) { - ADD_FATAL(EXTENSION_PROBLEM_EXT_INACTIVE, "bank"); + addFatalMessage(EXTENSION_PROBLEM_EXT_INACTIVE, "bank"); return; } diff --git a/inc/modules/member/what-beg.php b/inc/modules/member/what-beg.php index 3c52da3487..e9a2d6404b 100644 --- a/inc/modules/member/what-beg.php +++ b/inc/modules/member/what-beg.php @@ -38,7 +38,7 @@ if (!defined('__SECURITY')) { } elseif (!IS_MEMBER()) { LOAD_URL("modules.php?module=index"); } elseif ((!EXT_IS_ACTIVE("beg")) && (!IS_ADMIN())) { - ADD_FATAL(EXTENSION_PROBLEM_EXT_INACTIVE, "beg"); + addFatalMessage(EXTENSION_PROBLEM_EXT_INACTIVE, "beg"); return; } diff --git a/inc/modules/member/what-beg2.php b/inc/modules/member/what-beg2.php index dad1353420..116fd821d0 100644 --- a/inc/modules/member/what-beg2.php +++ b/inc/modules/member/what-beg2.php @@ -38,7 +38,7 @@ if (!defined('__SECURITY')) { } elseif (!IS_MEMBER()) { LOAD_URL("modules.php[5~?module=index"); } elseif ((!EXT_IS_ACTIVE("beg")) && (!IS_ADMIN())) { - ADD_FATAL(EXTENSION_PROBLEM_EXT_INACTIVE, "beg"); + addFatalMessage(EXTENSION_PROBLEM_EXT_INACTIVE, "beg"); return; } diff --git a/inc/modules/member/what-bonus.php b/inc/modules/member/what-bonus.php index 15861a7bcf..13f45b08d5 100644 --- a/inc/modules/member/what-bonus.php +++ b/inc/modules/member/what-bonus.php @@ -38,7 +38,7 @@ if (!defined('__SECURITY')) { } elseif (!IS_MEMBER()) { LOAD_URL("modules.php[5~?module=index"); } elseif ((!EXT_IS_ACTIVE("bonus")) && (!IS_ADMIN())) { - ADD_FATAL(EXTENSION_PROBLEM_EXT_INACTIVE, "bonus"); + addFatalMessage(EXTENSION_PROBLEM_EXT_INACTIVE, "bonus"); return; } diff --git a/inc/modules/member/what-doubler.php b/inc/modules/member/what-doubler.php index a57b9ea8fa..b22a9f3bc9 100644 --- a/inc/modules/member/what-doubler.php +++ b/inc/modules/member/what-doubler.php @@ -38,7 +38,7 @@ if (!defined('__SECURITY')) { } elseif (!IS_MEMBER()) { LOAD_URL("modules.php[5~?module=index"); } elseif ((!EXT_IS_ACTIVE("doubler")) && (!IS_ADMIN())) { - ADD_FATAL(EXTENSION_PROBLEM_EXT_INACTIVE, "doubler"); + addFatalMessage(EXTENSION_PROBLEM_EXT_INACTIVE, "doubler"); return; } diff --git a/inc/modules/member/what-holiday.php b/inc/modules/member/what-holiday.php index 61446af679..d9bf8ba0b2 100644 --- a/inc/modules/member/what-holiday.php +++ b/inc/modules/member/what-holiday.php @@ -38,7 +38,7 @@ if (!defined('__SECURITY')) { } elseif (!IS_MEMBER()) { LOAD_URL("modules.php?module=index"); } elseif ((!EXT_IS_ACTIVE("holiday")) && (!IS_ADMIN())) { - ADD_FATAL(EXTENSION_PROBLEM_EXT_INACTIVE, "holiday"); + addFatalMessage(EXTENSION_PROBLEM_EXT_INACTIVE, "holiday"); return; } diff --git a/inc/modules/member/what-html_mail.php b/inc/modules/member/what-html_mail.php index c961f043d4..c847867ca1 100644 --- a/inc/modules/member/what-html_mail.php +++ b/inc/modules/member/what-html_mail.php @@ -38,7 +38,7 @@ if (!defined('__SECURITY')) { } elseif (!IS_MEMBER()) { LOAD_URL("modules.php?module=index"); } elseif ((!EXT_IS_ACTIVE("html_mail")) && (!IS_ADMIN())) { - ADD_FATAL(EXTENSION_PROBLEM_EXT_INACTIVE, "html_mail"); + addFatalMessage(EXTENSION_PROBLEM_EXT_INACTIVE, "html_mail"); return; } diff --git a/inc/modules/member/what-mydata.php b/inc/modules/member/what-mydata.php index 7122e5e79a..cdd6f8a8fb 100644 --- a/inc/modules/member/what-mydata.php +++ b/inc/modules/member/what-mydata.php @@ -38,7 +38,7 @@ if (!defined('__SECURITY')) { } elseif (!IS_MEMBER()) { LOAD_URL("modules.php?module=index"); } elseif ((!EXT_IS_ACTIVE("mydata")) && (!IS_ADMIN())) { - ADD_FATAL(EXTENSION_PROBLEM_EXT_INACTIVE, "mydata"); + addFatalMessage(EXTENSION_PROBLEM_EXT_INACTIVE, "mydata"); return; } diff --git a/inc/modules/member/what-newsletter.php b/inc/modules/member/what-newsletter.php index d089725035..07baf13a77 100644 --- a/inc/modules/member/what-newsletter.php +++ b/inc/modules/member/what-newsletter.php @@ -38,7 +38,7 @@ if (!defined('__SECURITY')) { } elseif (!IS_MEMBER()) { LOAD_URL("modules.php?module=index"); } elseif ((!EXT_IS_ACTIVE("newsletter")) && (!IS_ADMIN())) { - ADD_FATAL(EXTENSION_PROBLEM_EXT_INACTIVE, "newsletter"); + addFatalMessage(EXTENSION_PROBLEM_EXT_INACTIVE, "newsletter"); return; } diff --git a/inc/modules/member/what-nickname.php b/inc/modules/member/what-nickname.php index 794862a32f..490ab2a768 100644 --- a/inc/modules/member/what-nickname.php +++ b/inc/modules/member/what-nickname.php @@ -38,7 +38,7 @@ if (!defined('__SECURITY')) { } elseif (!IS_MEMBER()) { LOAD_URL("modules.php?module=index"); } elseif ((!EXT_IS_ACTIVE("nickname")) && (!IS_ADMIN())) { - ADD_FATAL(EXTENSION_PROBLEM_EXT_INACTIVE, "nickname"); + addFatalMessage(EXTENSION_PROBLEM_EXT_INACTIVE, "nickname"); return; } diff --git a/inc/modules/member/what-order.php b/inc/modules/member/what-order.php index fec95d23c2..eb5511c230 100644 --- a/inc/modules/member/what-order.php +++ b/inc/modules/member/what-order.php @@ -38,7 +38,7 @@ if (!defined('__SECURITY')) { } elseif (!IS_MEMBER()) { LOAD_URL("modules.php?module=index"); } elseif ((!EXT_IS_ACTIVE("order")) && (!IS_ADMIN())) { - ADD_FATAL(EXTENSION_PROBLEM_EXT_INACTIVE, "order"); + addFatalMessage(EXTENSION_PROBLEM_EXT_INACTIVE, "order"); return; } diff --git a/inc/modules/member/what-payout.php b/inc/modules/member/what-payout.php index 88dbcc90be..a95a877735 100644 --- a/inc/modules/member/what-payout.php +++ b/inc/modules/member/what-payout.php @@ -40,7 +40,7 @@ if (!defined('__SECURITY')) { // Not logged in LOAD_URL("modules.php?module=index"); } elseif ((!EXT_IS_ACTIVE("payout")) && (!IS_ADMIN())) { - ADD_FATAL(EXTENSION_PROBLEM_EXT_INACTIVE, "payout"); + addFatalMessage(EXTENSION_PROBLEM_EXT_INACTIVE, "payout"); return; } diff --git a/inc/modules/member/what-points.php b/inc/modules/member/what-points.php index cdf9dcbd77..465e377ca5 100644 --- a/inc/modules/member/what-points.php +++ b/inc/modules/member/what-points.php @@ -191,7 +191,7 @@ if (EXT_IS_ACTIVE("user")) { LOAD_TEMPLATE("member_points"); } elseif (IS_ADMIN()) { // Missing extension - ADD_FATAL(sprintf(EXTENSION_PROBLEM_NOT_INSTALLED, "user")); + addFatalMessage(sprintf(EXTENSION_PROBLEM_NOT_INSTALLED, "user")); } else { // Message for user LOAD_TEMPLATE("admin_settings_saved", false, PROBLEM_POINTS_OVERVIEW_UNAVAILABLE); diff --git a/inc/modules/member/what-primera.php b/inc/modules/member/what-primera.php index 5889898c2c..7abf34c076 100644 --- a/inc/modules/member/what-primera.php +++ b/inc/modules/member/what-primera.php @@ -40,7 +40,7 @@ if (!defined('__SECURITY')) { LOAD_URL("modules.php?module=index"); } elseif ((!EXT_IS_ACTIVE("primera")) && (!IS_ADMIN())) { // Extension "primera" is not activated - ADD_FATAL(EXTENSION_PROBLEM_EXT_INACTIVE, "primera"); + addFatalMessage(EXTENSION_PROBLEM_EXT_INACTIVE, "primera"); return; } diff --git a/inc/modules/member/what-rallyes.php b/inc/modules/member/what-rallyes.php index 7d280f1825..05e609467b 100644 --- a/inc/modules/member/what-rallyes.php +++ b/inc/modules/member/what-rallyes.php @@ -38,7 +38,7 @@ if (!defined('__SECURITY')) { } elseif (!IS_MEMBER()) { LOAD_URL("modules.php?module=index"); } elseif ((!EXT_IS_ACTIVE("rallye")) && (!IS_ADMIN())) { - ADD_FATAL(EXTENSION_PROBLEM_EXT_INACTIVE, "rallye"); + addFatalMessage(EXTENSION_PROBLEM_EXT_INACTIVE, "rallye"); return; } diff --git a/inc/modules/member/what-refback.php b/inc/modules/member/what-refback.php index 9563cf746e..2a30ff392a 100644 --- a/inc/modules/member/what-refback.php +++ b/inc/modules/member/what-refback.php @@ -39,7 +39,7 @@ if (!defined('__SECURITY')) { // User is not logged in LOAD_URL("modules.php?module=index"); } elseif ((!EXT_IS_ACTIVE("refback")) && (!IS_ADMIN())) { - ADD_FATAL(EXTENSION_PROBLEM_EXT_INACTIVE, "refback"); + addFatalMessage(EXTENSION_PROBLEM_EXT_INACTIVE, "refback"); return; } diff --git a/inc/modules/member/what-sponsor.php b/inc/modules/member/what-sponsor.php index f6f60f75b7..fa65035f3a 100644 --- a/inc/modules/member/what-sponsor.php +++ b/inc/modules/member/what-sponsor.php @@ -37,7 +37,7 @@ if (!defined('__SECURITY')) { } elseif (!IS_MEMBER()) { LOAD_URL("modules.php?module=index"); } elseif ((!EXT_IS_ACTIVE("sponsor")) && (!IS_ADMIN())) { - ADD_FATAL(EXTENSION_PROBLEM_EXT_INACTIVE, "sponsor"); + addFatalMessage(EXTENSION_PROBLEM_EXT_INACTIVE, "sponsor"); return; } diff --git a/inc/modules/member/what-support.php b/inc/modules/member/what-support.php index 13cc548ee8..904d67393f 100644 --- a/inc/modules/member/what-support.php +++ b/inc/modules/member/what-support.php @@ -38,7 +38,7 @@ if (!defined('__SECURITY')) { } elseif (!IS_MEMBER()){ LOAD_URL("modules.php?module=index"); } elseif ((!EXT_IS_ACTIVE("support")) && (!IS_ADMIN())) { - ADD_FATAL(EXTENSION_PROBLEM_EXT_INACTIVE, "support"); + addFatalMessage(EXTENSION_PROBLEM_EXT_INACTIVE, "support"); return; } diff --git a/inc/modules/member/what-surfbar_book.php b/inc/modules/member/what-surfbar_book.php index c70cb25199..c1d861aeca 100644 --- a/inc/modules/member/what-surfbar_book.php +++ b/inc/modules/member/what-surfbar_book.php @@ -39,7 +39,7 @@ if (!defined('__SECURITY')) { // Redirect LOAD_URL("modules.php?module=index"); } elseif ((!EXT_IS_ACTIVE("surfbar")) && (!IS_ADMIN())) { - ADD_FATAL(EXTENSION_PROBLEM_EXT_INACTIVE, "surfbar"); + addFatalMessage(EXTENSION_PROBLEM_EXT_INACTIVE, "surfbar"); return; } diff --git a/inc/modules/member/what-surfbar_list.php b/inc/modules/member/what-surfbar_list.php index 4a5493fb02..d3754e6c13 100644 --- a/inc/modules/member/what-surfbar_list.php +++ b/inc/modules/member/what-surfbar_list.php @@ -38,7 +38,7 @@ if (!defined('__SECURITY')) { } elseif (!IS_MEMBER()) { LOAD_URL("modules.php?module=index"); } elseif ((!EXT_IS_ACTIVE("surfbar")) && (!IS_ADMIN())) { - ADD_FATAL(EXTENSION_PROBLEM_EXT_INACTIVE, "surfbar"); + addFatalMessage(EXTENSION_PROBLEM_EXT_INACTIVE, "surfbar"); return; } diff --git a/inc/modules/member/what-surfbar_start.php b/inc/modules/member/what-surfbar_start.php index ccb4d2dd5c..13837e422c 100644 --- a/inc/modules/member/what-surfbar_start.php +++ b/inc/modules/member/what-surfbar_start.php @@ -39,7 +39,7 @@ if (!defined('__SECURITY')) { // Not logged in LOAD_URL("modules.php?module=index"); } elseif ((!EXT_IS_ACTIVE("surfbar")) && (!IS_ADMIN())) { - ADD_FATAL(EXTENSION_PROBLEM_EXT_INACTIVE, "surfbar"); + addFatalMessage(EXTENSION_PROBLEM_EXT_INACTIVE, "surfbar"); return; } diff --git a/inc/modules/member/what-surfbar_stats.php b/inc/modules/member/what-surfbar_stats.php index bcdd6d1b4c..a79ab6da58 100644 --- a/inc/modules/member/what-surfbar_stats.php +++ b/inc/modules/member/what-surfbar_stats.php @@ -38,7 +38,7 @@ if (!defined('__SECURITY')) { } elseif (!IS_MEMBER()) { LOAD_URL("modules.php?module=index"); } elseif ((!EXT_IS_ACTIVE("surfbar")) && (!IS_ADMIN())) { - ADD_FATAL(EXTENSION_PROBLEM_EXT_INACTIVE, "surfbar"); + addFatalMessage(EXTENSION_PROBLEM_EXT_INACTIVE, "surfbar"); return; } diff --git a/inc/modules/member/what-themes.php b/inc/modules/member/what-themes.php index 17708e14d7..bca190b2af 100644 --- a/inc/modules/member/what-themes.php +++ b/inc/modules/member/what-themes.php @@ -38,7 +38,7 @@ if (!defined('__SECURITY')) { } elseif (!IS_MEMBER()) { LOAD_URL("modules.php?module=index"); } elseif ((!EXT_IS_ACTIVE("theme")) && (!IS_ADMIN())) { - ADD_FATAL(EXTENSION_PROBLEM_EXT_INACTIVE, "theme"); + addFatalMessage(EXTENSION_PROBLEM_EXT_INACTIVE, "theme"); return; } diff --git a/inc/modules/member/what-transfer.php b/inc/modules/member/what-transfer.php index 06406df1f0..abb2c5677e 100644 --- a/inc/modules/member/what-transfer.php +++ b/inc/modules/member/what-transfer.php @@ -38,7 +38,7 @@ if (!defined('__SECURITY')) { } elseif (!IS_MEMBER()) { LOAD_URL("modules.php?module=index"); } elseif ((!EXT_IS_ACTIVE("transfer")) && (!IS_ADMIN())) { - ADD_FATAL(EXTENSION_PROBLEM_EXT_INACTIVE, "transfer"); + addFatalMessage(EXTENSION_PROBLEM_EXT_INACTIVE, "transfer"); return; } diff --git a/inc/modules/member/what-wernis.php b/inc/modules/member/what-wernis.php index c6e74e4094..c66b29d414 100644 --- a/inc/modules/member/what-wernis.php +++ b/inc/modules/member/what-wernis.php @@ -39,7 +39,7 @@ if (!defined('__SECURITY')) { // User is not logged in LOAD_URL("modules.php?module=index"); } elseif ((!EXT_IS_ACTIVE("wernis")) && (!IS_ADMIN())) { - ADD_FATAL(EXTENSION_PROBLEM_EXT_INACTIVE, "wernis"); + addFatalMessage(EXTENSION_PROBLEM_EXT_INACTIVE, "wernis"); return; } diff --git a/inc/modules/order.php b/inc/modules/order.php index c6c5be24a5..db72794c44 100644 --- a/inc/modules/order.php +++ b/inc/modules/order.php @@ -37,7 +37,7 @@ if (!defined('__SECURITY')) { $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php"; require($INC); } elseif ((!EXT_IS_ACTIVE("order")) && (!IS_ADMIN())) { - ADD_FATAL(EXTENSION_PROBLEM_EXT_INACTIVE, "order"); + addFatalMessage(EXTENSION_PROBLEM_EXT_INACTIVE, "order"); return; } elseif (!IS_MEMBER()) { // Sorry, no guest access! diff --git a/inc/modules/sponsor.php b/inc/modules/sponsor.php index 1067b35903..4abb280e85 100644 --- a/inc/modules/sponsor.php +++ b/inc/modules/sponsor.php @@ -35,11 +35,11 @@ if (!defined('__SECURITY')) { $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4)."/security.php"; require($INC); } elseif ((!EXT_IS_ACTIVE("sponsor")) - ADD_FATAL(EXTENSION_PROBLEM_EXT_INACTIVE); + addFatalMessage(EXTENSION_PROBLEM_EXT_INACTIVE); return; } elseif (!IS_SPONSOR()) { // No sponsor! - ADD_FATAL(SPONSOR_ONLY_AREA_ENTERED); + addFatalMessage(SPONSOR_ONLY_AREA_ENTERED); return; } elseif (empty($GLOBALS['what'])) { // Empty what value detected! diff --git a/inc/modules/sponsor/.php b/inc/modules/sponsor/.php index 2fcd672091..ff7f46596c 100644 --- a/inc/modules/sponsor/.php +++ b/inc/modules/sponsor/.php @@ -35,11 +35,11 @@ if (!defined('__SECURITY')) { $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4)."/security.php"; require($INC); } elseif ((!EXT_IS_ACTIVE("sponsor")) - ADD_FATAL(EXTENSION_PROBLEM_EXT_INACTIVE); + addFatalMessage(EXTENSION_PROBLEM_EXT_INACTIVE); return; } elseif (!IS_SPONSOR()) { // No sponsor! - ADD_FATAL(SPONSOR_ONLY_AREA_ENTERED); + addFatalMessage(SPONSOR_ONLY_AREA_ENTERED); return; } diff --git a/inc/modules/sponsor/account.php b/inc/modules/sponsor/account.php index 70c8f4b128..747104be27 100644 --- a/inc/modules/sponsor/account.php +++ b/inc/modules/sponsor/account.php @@ -35,11 +35,11 @@ if (!defined('__SECURITY')) { $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4)."/security.php"; require($INC); } elseif ((!EXT_IS_ACTIVE("sponsor")) - ADD_FATAL(EXTENSION_PROBLEM_EXT_INACTIVE); + addFatalMessage(EXTENSION_PROBLEM_EXT_INACTIVE); return; } elseif (!IS_SPONSOR()) { // No sponsor! - ADD_FATAL(SPONSOR_ONLY_AREA_ENTERED); + addFatalMessage(SPONSOR_ONLY_AREA_ENTERED); return; } diff --git a/inc/modules/sponsor/settings.php b/inc/modules/sponsor/settings.php index 0d46ecf129..b1b2464830 100644 --- a/inc/modules/sponsor/settings.php +++ b/inc/modules/sponsor/settings.php @@ -35,11 +35,11 @@ if (!defined('__SECURITY')) { $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4)."/security.php"; require($INC); } elseif ((!EXT_IS_ACTIVE("sponsor")) - ADD_FATAL(EXTENSION_PROBLEM_EXT_INACTIVE); + addFatalMessage(EXTENSION_PROBLEM_EXT_INACTIVE); return; } elseif (!IS_SPONSOR()) { // No sponsor! - ADD_FATAL(SPONSOR_ONLY_AREA_ENTERED); + addFatalMessage(SPONSOR_ONLY_AREA_ENTERED); return; } diff --git a/inc/modules/sponsor/welcome.php b/inc/modules/sponsor/welcome.php index d2c0c59444..0c4be62050 100644 --- a/inc/modules/sponsor/welcome.php +++ b/inc/modules/sponsor/welcome.php @@ -35,11 +35,11 @@ if (!defined('__SECURITY')) { $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4)."/security.php"; require($INC); } elseif ((!EXT_IS_ACTIVE("sponsor")) - ADD_FATAL(EXTENSION_PROBLEM_EXT_INACTIVE); + addFatalMessage(EXTENSION_PROBLEM_EXT_INACTIVE); return; } elseif (!IS_SPONSOR()) { // No sponsor! - ADD_FATAL(SPONSOR_ONLY_AREA_ENTERED); + addFatalMessage(SPONSOR_ONLY_AREA_ENTERED); return; } diff --git a/inc/mysql-connect.php b/inc/mysql-connect.php index a8d95cf98f..5d0c6c8a48 100644 --- a/inc/mysql-connect.php +++ b/inc/mysql-connect.php @@ -95,7 +95,7 @@ function __SHUTDOWN_HOOK () { SQL_CLOSE($link, __FILE__, __LINE__); } else { // No database link - ADD_FATAL(NO_DB_LINK); + addFatalMessage(NO_DB_LINK); } } @@ -125,6 +125,10 @@ $_CONFIG = array( 'last_update' => time() ); +// Init fatal messages +global $FATAL; +$FATAL = array(); + // Check if this file is writeable or read-only and warn the user if ((!isBooleanConstantAndTrue('mxchange_installing')) && (isBooleanConstantAndTrue('mxchange_installed'))) { // Check for write-permission for config.php and inc directory @@ -234,14 +238,14 @@ if ((!isBooleanConstantAndTrue('mxchange_installing')) && (isBooleanConstantAndT include (PATH."inc/language.php"); // Wrong database? - ADD_FATAL(WRONG_DB_SELECTED); + addFatalMessage(WRONG_DB_SELECTED); } } else { // Add language system include (PATH."inc/language.php"); // No link to database! - ADD_FATAL(NO_DB_LINK); + addFatalMessage(NO_DB_LINK); $db = false; } } else { @@ -249,7 +253,7 @@ if ((!isBooleanConstantAndTrue('mxchange_installing')) && (isBooleanConstantAndT include (PATH."inc/language.php"); // Maybe you forgot to enter your MySQL data? - ADD_FATAL(MYSQL_DATA_MISSING); + addFatalMessage(MYSQL_DATA_MISSING); } } else { /////////////////////////////////////////////////// @@ -274,26 +278,22 @@ if ((!isBooleanConstantAndTrue('mxchange_installing')) && (isBooleanConstantAndT if ((!isBooleanConstantAndTrue('mxchange_installed')) || (!isBooleanConstantAndTrue('admin_registered'))) { // Check for file permissions if (!IS_INC_WRITEABLE("config")) { - ADD_FATAL(CONFIG_IS_WRITE_PROTECTED); + addFatalMessage(CONFIG_IS_WRITE_PROTECTED); } // END - if if (!IS_INC_WRITEABLE("dummy")) { - ADD_FATAL(DUMMY_IS_WRITE_PROTECTED); + addFatalMessage(DUMMY_IS_WRITE_PROTECTED); } // END - if if (!IS_INC_WRITEABLE(".secret/dummy")) { - ADD_FATAL(SECRET_IS_WRITE_PROTECTED); + addFatalMessage(SECRET_IS_WRITE_PROTECTED); } // END - if } // END - if } -// Any fatal messages? -if (!is_array($FATAL)) $FATAL = array(); -if (((sizeof($FATAL) > 0) || (!empty($FATAL[0]))) && (isBooleanConstantAndTrue('mxchange_installed')) && (!defined('mxchange_installing')) && ($CSS != "1")) { +if ((getTotalFatalErrors() > 0) && (isBooleanConstantAndTrue('mxchange_installed')) && (!defined('mxchange_installing')) && ($CSS != "1")) { // One or more fatal error(s) occur during connect... include (PATH."inc/header.php"); include (PATH."inc/fatal_errors.php"); - unset($FATAL); include (PATH."inc/footer.php"); - exit; } // END - if // diff --git a/install.php b/install.php index 9f954414b4..4a7366a5de 100644 --- a/install.php +++ b/install.php @@ -72,11 +72,11 @@ if (!isset($_GET['page'])) { // Already installed? if ((isBooleanConstantAndTrue('mxchange_installed')) && (isBooleanConstantAndTrue('admin_registered'))) { // Add fatal message - ADD_FATAL(ALREADY_INSTALLED); + addFatalMessage(ALREADY_INSTALLED); } // END - if // Does something goes wrong? -if ((sizeof($FATAL == 0)) && (empty($FATAL[0]))) { +if (getTotalFatalMessages() == 0) { // Add main installation table LOAD_TEMPLATE("install_header"); diff --git a/mailid.php b/mailid.php index 523d319c19..5bca0bab23 100644 --- a/mailid.php +++ b/mailid.php @@ -59,10 +59,8 @@ if (isBooleanConstantAndTrue('mxchange_installed')) { if (!empty($_GET['mailid'])) $url_mid = bigintval($_GET['mailid']); if (!empty($_GET['bonusid'])) $url_bid = bigintval($_GET['bonusid']); - //* DEBUG: */ die("*".$url_uid."/".$url_bid."/".$url_mid."*
    ".print_r($FATAL, true)."
    "); - - // 01 1 12 3 32 21 1 2 2 10 - if (($url_uid) > 0 && (($url_mid > 0) || ($url_bid > 0)) && (count($FATAL) == 0)) { + // 01 1 12 3 32 21 1 22 10 + if (($url_uid) > 0 && (($url_mid > 0) || ($url_bid > 0)) && (getTotalFatalErrors() == 0)) { // Maybe he wants to confirm an email? if ($url_mid > 0) { // Normal-Mails diff --git a/mailid_top.php b/mailid_top.php index 27da0b7caa..46b7a95310 100644 --- a/mailid_top.php +++ b/mailid_top.php @@ -48,7 +48,7 @@ if (isBooleanConstantAndTrue('mxchange_installed')) { // Is the extension active if (!EXT_IS_ACTIVE("mailid", true)) { // Is not activated/installed yet! - ADD_FATAL(sprintf(EXTENSION_PROBLEM_NOT_INSTALLED, "mailid")); + addFatalMessage(sprintf(EXTENSION_PROBLEM_NOT_INSTALLED, "mailid")); } // END - if // Secure all data @@ -59,8 +59,8 @@ if (isBooleanConstantAndTrue('mxchange_installed')) { if (!empty($_GET['code'])) $code = bigintval($_GET['code']); if (!empty($_GET['mode'])) $mode = $_GET['mode']; - // 01 1 12 2 2 21 1 2 2 10 - if (($url_uid) > 0 && (($url_mid > 0) || ($url_bid > 0)) && (count($FATAL) == 0)) { + // 01 1 12 2 2 21 1 22 10 + if (($url_uid) > 0 && (($url_mid > 0) || ($url_bid > 0)) && (getTotalFatalErrors() == 0)) { // No image? Then output header if ($mode != "img") require_once(PATH."inc/header.php"); diff --git a/modules.php b/modules.php index f8c1a88e38..e05a1b25ed 100644 --- a/modules.php +++ b/modules.php @@ -100,8 +100,8 @@ include (PATH."inc/header.php"); $MOD_VALID = false; $check = "failed"; if ((getConfig('maintenance') == "Y") && (!IS_ADMIN()) && ($GLOBALS['module'] != "admin")) { // Maintain mode is active and you are no admin - ADD_FATAL(LANG_DOWN_MAINTAINCE); -} elseif (($link) && ($db) && (sizeof($FATAL) == 0)) { + addFatalMessage(LANG_DOWN_MAINTAINCE); +} elseif (($link) && ($db) && (getTotalFatalErrors() == 0)) { // Did we found the module listed in allowed modules and are we successfully connected? $check = CHECK_MODULE($GLOBALS['module']); switch ($check) @@ -113,39 +113,39 @@ if ((getConfig('maintenance') == "Y") && (!IS_ADMIN()) && ($GLOBALS['module'] != define('__MODULE', sprintf("%sinc/modules/%s.php", PATH, SQL_ESCAPE($GLOBALS['module']))); // Does the module exists on local file system? - if ((FILE_READABLE(__MODULE)) && (sizeof($FATAL) == 0)) { + if ((FILE_READABLE(__MODULE)) && (getTotalFatalErrors() == 0)) { // Module is valid, active and located on the local disc... $MOD_VALID = true; } elseif (!empty($URL)) { // An URL was specified so we load the de-referrer module LOAD_URL(DEREFERER($URL)); - } elseif (sizeof($FATAL) == 0) { - ADD_FATAL(LANG_MOD_REG_404_1.$GLOBALS['module'].LANG_MOD_REG_404_2); + } elseif (getTotalFatalErrors() == 0) { + addFatalMessage(LANG_MOD_REG_404_1.$GLOBALS['module'].LANG_MOD_REG_404_2); } break; case "404": - ADD_FATAL(LANG_MOD_REG_404_1.$GLOBALS['module'].LANG_MOD_REG_404_2); + addFatalMessage(LANG_MOD_REG_404_1.$GLOBALS['module'].LANG_MOD_REG_404_2); break; case "locked": if (!FILE_READABLE(PATH."inc/modules/".$GLOBALS['module'].".php")) { // Module does addionally not exists - ADD_FATAL(LANG_MOD_REG_404_1.$GLOBALS['module'].LANG_MOD_REG_404_2); + addFatalMessage(LANG_MOD_REG_404_1.$GLOBALS['module'].LANG_MOD_REG_404_2); } // END - if // Add fatal message - ADD_FATAL(LANG_MOD_LOCKED_1.$GLOBALS['module'].LANG_MOD_LOCKED_2); + addFatalMessage(LANG_MOD_LOCKED_1.$GLOBALS['module'].LANG_MOD_LOCKED_2); break; default: DEBUG_LOG(__FILE__, __LINE__, sprintf("Unknown status %s return from module check. Module=%s", $check, $GLOBALS['module'])); - ADD_FATAL(LANG_MOD_UNKNOWN_1.$check.LANG_MOD_UNKNOWN_2); + addFatalMessage(LANG_MOD_UNKNOWN_1.$check.LANG_MOD_UNKNOWN_2); break; } -} elseif (sizeof($FATAL) == 0) { +} elseif (getTotalFatalErrors() == 0) { // MySQL problems! - ADD_FATAL(MYSQL_ERRORS); + addFatalMessage(MYSQL_ERRORS); } if (($MOD_VALID) && (defined('__MODULE'))) {