Some functions rewritten to hungarian notation, handling of array rewritten
authorRoland Häder <roland@mxchange.org>
Sat, 7 Feb 2009 20:15:12 +0000 (20:15 +0000)
committerRoland Häder <roland@mxchange.org>
Sat, 7 Feb 2009 20:15:12 +0000 (20:15 +0000)
124 files changed:
click.php
debug.php
inc/databases.php
inc/db/lib-mysql3.php
inc/extensions/ext-cache.php
inc/extensions/ext-rewrite.php
inc/fatal_errors.php
inc/filters.php
inc/footer.php
inc/functions.php
inc/header.php
inc/install-inc.php
inc/libs/cache_functions.php
inc/libs/security_functions.php
inc/libs/surfbar_functions.php
inc/modules/admin.php
inc/modules/admin/action-
inc/modules/admin/action-admins.php
inc/modules/admin/action-bank.php
inc/modules/admin/action-country.php
inc/modules/admin/action-doubler.php
inc/modules/admin/action-email.php
inc/modules/admin/action-holiday.php
inc/modules/admin/action-login.php
inc/modules/admin/action-menu.php
inc/modules/admin/action-misc.php
inc/modules/admin/action-mods.php
inc/modules/admin/action-newsletter.php
inc/modules/admin/action-payouts.php
inc/modules/admin/action-primera.php
inc/modules/admin/action-rallye.php
inc/modules/admin/action-repair.php
inc/modules/admin/action-setup.php
inc/modules/admin/action-sponsor.php
inc/modules/admin/action-stats.php
inc/modules/admin/action-surfbar.php
inc/modules/admin/action-task.php
inc/modules/admin/action-theme.php
inc/modules/admin/action-transfer.php
inc/modules/admin/action-user.php
inc/modules/admin/action-wernis.php
inc/modules/admin/admin-inc.php
inc/modules/admin/what-config_other.php
inc/modules/admin/what-config_yoomedia.php
inc/modules/admin/what-del_task.php
inc/modules/admin/what-list_links.php
inc/modules/admin/what-list_task.php
inc/modules/admin/what-list_unconfirmed.php
inc/modules/admin/what-list_user.php
inc/modules/admin/what-list_yoomedia_tm.php
inc/modules/admin/what-overview.php
inc/modules/admin/what-send_bonus.php
inc/modules/admin/what-theme_edit.php
inc/modules/admin/what-theme_import.php
inc/modules/guest/action-
inc/modules/guest/action-admin.php
inc/modules/guest/action-main.php
inc/modules/guest/action-members.php
inc/modules/guest/action-sponsor.php
inc/modules/guest/action-themes.php
inc/modules/guest/what-active.php
inc/modules/guest/what-beg.php
inc/modules/guest/what-doubler.php
inc/modules/guest/what-login.php
inc/modules/guest/what-mediadata.php
inc/modules/guest/what-rallyes.php
inc/modules/guest/what-register.php
inc/modules/guest/what-sponsor_agb.php
inc/modules/guest/what-sponsor_infos.php
inc/modules/guest/what-sponsor_login.php
inc/modules/guest/what-sponsor_reg.php
inc/modules/guest/what-top10.php
inc/modules/guest/what-wernis_portal.php
inc/modules/member/action-
inc/modules/member/action-account.php
inc/modules/member/action-bank.php
inc/modules/member/action-extras.php
inc/modules/member/action-logout.php
inc/modules/member/action-main.php
inc/modules/member/action-order.php
inc/modules/member/action-rals.php
inc/modules/member/action-stats.php
inc/modules/member/action-surfbar.php
inc/modules/member/action-themes.php
inc/modules/member/what-bank_create.php
inc/modules/member/what-bank_deposit.php
inc/modules/member/what-bank_infos.php
inc/modules/member/what-bank_output.php
inc/modules/member/what-bank_withdraw.php
inc/modules/member/what-beg.php
inc/modules/member/what-beg2.php
inc/modules/member/what-bonus.php
inc/modules/member/what-doubler.php
inc/modules/member/what-holiday.php
inc/modules/member/what-html_mail.php
inc/modules/member/what-mydata.php
inc/modules/member/what-newsletter.php
inc/modules/member/what-nickname.php
inc/modules/member/what-order.php
inc/modules/member/what-payout.php
inc/modules/member/what-points.php
inc/modules/member/what-primera.php
inc/modules/member/what-rallyes.php
inc/modules/member/what-refback.php
inc/modules/member/what-sponsor.php
inc/modules/member/what-support.php
inc/modules/member/what-surfbar_book.php
inc/modules/member/what-surfbar_list.php
inc/modules/member/what-surfbar_start.php
inc/modules/member/what-surfbar_stats.php
inc/modules/member/what-themes.php
inc/modules/member/what-transfer.php
inc/modules/member/what-wernis.php
inc/modules/order.php
inc/modules/sponsor.php
inc/modules/sponsor/.php
inc/modules/sponsor/account.php
inc/modules/sponsor/settings.php
inc/modules/sponsor/welcome.php
inc/mysql-connect.php
install.php
mailid.php
mailid_top.php
modules.php

index f5dbe4b..13431b1 100644 (file)
--- 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
index 0d6150c..025ec75 100644 (file)
--- a/debug.php
+++ b/debug.php
 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... ;-)
index c7fed7c..768f9b6 100644 (file)
@@ -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);
index fe37cb6..b110456 100644 (file)
@@ -50,7 +50,7 @@ function SQL_QUERY ($sql_string, $F, $L) {
        // Run SQL command
        //* DEBUG: */ echo $sql_string."<br />\n";
        $result = @mysql_query($sql_string, $link)
-        or ADD_FATAL($F." (".$L."):".mysql_error()."<br />
+        or addFatalMessage($F." (".$L."):".mysql_error()."<br />
 Query string:<br />
 ".$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;
 }
index 3798fa9..9d5f72a 100644 (file)
@@ -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__."(<font color=\"#0000aa\">".__LINE__."</font>): ".CACHE_CANNOT_INITIALIZE);
+                       addFatalMessage(__FILE__."(<font color=\"#0000aa\">".__LINE__."</font>): ".CACHE_CANNOT_INITIALIZE);
                } // END - if
        } // END - if
        break;
index 4cb2b00..3cdd3ce 100644 (file)
@@ -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&uuml;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;
 }
index 96a7d85..a3a476c 100644 (file)
@@ -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);
index 9c4c862..bd4fd26 100644 (file)
@@ -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
 
index 5e248a6..9a7b05f 100644 (file)
@@ -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
index 049a0c5..0562cce 100644 (file)
@@ -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;
 
index b510202..40a3a80 100644 (file)
@@ -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
 
index 0ff9df8..1b9ecb6 100644 (file)
@@ -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("<SPAN class=\"install_fatal\">");
                        foreach ($FATAL as $key => $err) {
                                OUTPUT_HTML("  <STRONG>&middot;</STRONG>&nbsp;".FATAL_NO.($key + 1).":&nbsp;".$err."<br />");
@@ -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 .= "    <LI>".$value."</LI>\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);
 }
 //
 ?>
index 6718532..bb5db58 100644 (file)
@@ -112,7 +112,7 @@ class CacheSystem {
                        $this->storeExtensionVersion("cache");
                } else {
                        // Cannot create file
-                       ADD_FATAL(__FILE__."(<font color=\"#0000aa\">".__LINE__."</font>): ".CACHE_PROBLEMS_DETECTED);
+                       addFatalMessage(__FILE__."(<font color=\"#0000aa\">".__LINE__."</font>): ".CACHE_PROBLEMS_DETECTED);
                }
        }
 
@@ -142,7 +142,7 @@ class CacheSystem {
                        }
                } else {
                        // Cannot create file
-                       ADD_FATAL(__FILE__."(<font color=\"#0000aa\">".__LINE__."</font>): ".CACHE_PROBLEMS_DETECTED);
+                       addFatalMessage(__FILE__."(<font color=\"#0000aa\">".__LINE__."</font>): ".CACHE_PROBLEMS_DETECTED);
                }
        }
 
@@ -205,7 +205,7 @@ class CacheSystem {
                        }
                } else {
                        // Cache file not found or not readable
-                       ADD_FATAL(__FILE__."(<font color=\"#0000aa\">".__LINE__."</font>): ".CACHE_CANNOT_LOAD_1.$this->inc.CACHE_CANNOT_LOAD_2);
+                       addFatalMessage(__FILE__."(<font color=\"#0000aa\">".__LINE__."</font>): ".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__."(<font color=\"#0000aa\">".__LINE__."</font>): ".CACHE_CANNOT_UNLINK_1.$this->inc.CACHE_CANNOT_UNLINK_2);
+                               addFatalMessage(__FILE__."(<font color=\"#0000aa\">".__LINE__."</font>): ".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__."(<font color=\"#0000aa\">".__LINE__."</font>): ".CACHE_PROBLEMS_DETECTED);
+                       addFatalMessage(__FILE__."(<font color=\"#0000aa\">".__LINE__."</font>): ".CACHE_PROBLEMS_DETECTED);
                }
        }
 
@@ -283,7 +283,7 @@ class CacheSystem {
                        } // END - foreach
                } else {
                        // Cannot write array!
-                       ADD_FATAL(__FILE__."(<font color=\"#0000aa\">".__LINE__."</font>): ".CACHE_PROBLEMS_DETECTED);
+                       addFatalMessage(__FILE__."(<font color=\"#0000aa\">".__LINE__."</font>): ".CACHE_PROBLEMS_DETECTED);
                }
        }
 
@@ -320,7 +320,7 @@ class CacheSystem {
                        } // END - if
                } else {
                        // Cannot write to cache!
-                       ADD_FATAL(__FILE__."(<font color=\"#0000aa\">".__LINE__."</font>): ".CACHE_PROBLEMS_DETECTED);
+                       addFatalMessage(__FILE__."(<font color=\"#0000aa\">".__LINE__."</font>): ".CACHE_PROBLEMS_DETECTED);
                }
        }
 
@@ -338,7 +338,7 @@ class CacheSystem {
                        //* DEBUG: */ print __METHOD__."(<font color=\"#0000aa\">".__LINE__."</font>): {$this->name} - {$ext_name}={$ext_ver}<br />\n";
                } else {
                        // Cannot create file
-                       ADD_FATAL(__FILE__."(<font color=\"#0000aa\">".__LINE__."</font>): ".CACHE_PROBLEMS_DETECTED);
+                       addFatalMessage(__FILE__."(<font color=\"#0000aa\">".__LINE__."</font>): ".CACHE_PROBLEMS_DETECTED);
                }
        }
 
index 5b55893..02b5132 100644 (file)
@@ -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
index 434ce4f..31cd556 100644 (file)
@@ -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
index 7195331..9bb05dc 100644 (file)
@@ -332,7 +332,7 @@ if (!isBooleanConstantAndTrue('admin_registered')) {
                OUTPUT_HTML("<STRONG class=\"admin_fatal\">".ADMIN_LOGOUT_FAILED."</STRONG>");
 
                // 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
index b376444..df0c9bf 100644 (file)
@@ -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);
 }
 
 //
index 57e0b82..37a2dbe 100644 (file)
@@ -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);
 }
 
 //
index fd7f3e0..cef2094 100644 (file)
@@ -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);
 }
 
 //
index 4736252..6c50163 100644 (file)
@@ -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);
 }
 
 //
index baa342f..85af60e 100644 (file)
@@ -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);
 }
 
 //
index 806fc69..e14a825 100644 (file)
@@ -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);
 }
 
 //
index 7924748..184d740 100644 (file)
@@ -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);
 }
 
 //
index 5e51c7f..ff9a9ec 100644 (file)
@@ -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);
 }
 
 //
index 2643a16..c327a28 100644 (file)
@@ -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);
 }
 
 //
index 0f33b8e..b4aa437 100644 (file)
@@ -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);
 }
 
 //
index e286fca..fe17518 100644 (file)
@@ -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);
 }
 
 //
index 4114603..27a2b8b 100644 (file)
@@ -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);
 }
 
 //
index 8a44bf6..8431860 100644 (file)
@@ -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);
 }
 
 //
index cc6d11d..7f4fa85 100644 (file)
@@ -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);
 }
 
 //
index 7534627..c1b230c 100644 (file)
@@ -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);
 }
 
 //
index 6073f06..c6565fd 100644 (file)
@@ -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);
 }
 
 //
index 4cf6159..048bee2 100644 (file)
@@ -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);
 }
 
 //
index 7effb6f..f840cf9 100644 (file)
@@ -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);
 }
 //
 ?>
index add4def..6926bd2 100644 (file)
@@ -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);
 }
 
 //
index 2a69435..da666b5 100644 (file)
@@ -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);
 }
 
 //
index 9f28d46..f143558 100644 (file)
@@ -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);
 }
 
 //
index dbf518f..b832d39 100644 (file)
@@ -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);
 }
 
 //
index 692128a..08a6d3e 100644 (file)
@@ -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);
 }
 
 //
index ba5a009..3971d43 100644 (file)
@@ -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);
 }
 
 //
index 65a75c8..c389719 100644 (file)
@@ -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);
 }
 
 //
index af97f70..fe98128 100644 (file)
@@ -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
index 3b6d126..9b79974 100644 (file)
@@ -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;
 }
 
index b50caf3..f196a28 100644 (file)
@@ -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;
 }
 
index 7212e1e..3aa851b 100644 (file)
@@ -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;
 }
 
index 1884892..2b81e06 100644 (file)
@@ -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;
 }
 
index b9a66f3..8370a1c 100644 (file)
@@ -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;
 }
 
index 86bf307..a6bdba6 100644 (file)
@@ -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;
 }
 
index 95e3d71..9b15ec8 100644 (file)
@@ -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;
 }
 
index 1e9e49e..67c9db2 100644 (file)
@@ -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;
 }
 
index 965ac2b..83e1660 100644 (file)
@@ -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)
index 0d4a1f6..583d7eb 100644 (file)
@@ -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;
 }
 
index f69e0a4..ef64b51 100644 (file)
@@ -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;
 }
 
index 1df771d..871e94a 100644 (file)
@@ -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;
 }
 
index 6b8b39b..a1eb5eb 100644 (file)
@@ -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'])));
 }
 
 //
index efbbf18..5d3416a 100644 (file)
@@ -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'])));
 }
 
 //
index 94592b2..87d77a9 100644 (file)
@@ -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'])));
 }
 
 //
index 7836271..c24c213 100644 (file)
@@ -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'])));
 }
 
 //
index df18e40..323eea8 100644 (file)
@@ -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'])));
 }
 
 //
index 8bbac22..810f1ab 100644 (file)
@@ -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;
 }
 
index ba45f0c..724810e 100644 (file)
@@ -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;
 }
 
index 88b8d46..d61d0d0 100644 (file)
@@ -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;
 }
 
index b50ddca..71cfbdd 100644 (file)
@@ -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;
 }
 
index 6b10899..23d2f9d 100644 (file)
@@ -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 {
index e2f2fab..0d0b12a 100644 (file)
@@ -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;
 }
 
index edf0785..fc616fb 100644 (file)
@@ -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;
 }
 
index b7f3948..f17a36c 100644 (file)
@@ -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;
 }
index ec291ec..6697f1e 100644 (file)
@@ -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;
 }
index 39cf47f..f172a5a 100644 (file)
@@ -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;
 }
index 2f7ed2a..c175a55 100644 (file)
@@ -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;
 }
index 7060952..cb67895 100644 (file)
@@ -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;
 }
index 5259cdf..56c3654 100644 (file)
@@ -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;
 }
 
index fa37e33..eb6491c 100644 (file)
@@ -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;
 }
 
index 9f305f1..fdb3590 100644 (file)
@@ -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);
 }
 
 //
index 91e746e..8f169ec 100644 (file)
@@ -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);
 }
 
 //
index d334432..b3fd7f4 100644 (file)
@@ -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);
 }
 
 //
index 89cdbb8..0badee2 100644 (file)
@@ -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);
 }
 
 //
index 8c2867a..74945d1 100644 (file)
@@ -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);
 }
 
 //
index 24359aa..e280b75 100644 (file)
@@ -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);
 }
 
 //
index b546a77..6c327f2 100644 (file)
@@ -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);
 }
 
 //
index 07465df..b562617 100644 (file)
@@ -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);
 }
 
 //
index a60ad4b..bd22b44 100644 (file)
@@ -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);
 }
 
 //
index 163bd49..4cfdee5 100644 (file)
@@ -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);
 }
 
 //
index c06b4d9..9e39e3e 100644 (file)
@@ -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;
 }
 
index fc9288f..31bbf4c 100644 (file)
@@ -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");
index 7012c64..1344403 100644 (file)
@@ -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;
 }
 
index c622b56..d9915df 100644 (file)
@@ -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;
 }
 
index c622b56..d9915df 100644 (file)
@@ -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;
 }
 
index c622b56..d9915df 100644 (file)
@@ -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;
 }
 
index 3c52da3..e9a2d64 100644 (file)
@@ -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;
 }
 
index dad1353..116fd82 100644 (file)
@@ -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;
 }
 
index 15861a7..13f45b0 100644 (file)
@@ -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;
 }
 
index a57b9ea..b22a9f3 100644 (file)
@@ -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;
 }
 
index 61446af..d9bf8ba 100644 (file)
@@ -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;
 }
 
index c961f04..c847867 100644 (file)
@@ -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;
 }
 
index 7122e5e..cdd6f8a 100644 (file)
@@ -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;
 }
 
index d089725..07baf13 100644 (file)
@@ -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;
 }
 
index 794862a..490ab2a 100644 (file)
@@ -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;
 }
 
index fec95d2..eb5511c 100644 (file)
@@ -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;
 }
 
index 88dbcc9..a95a877 100644 (file)
@@ -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;
 }
 
index cdf9dcb..465e377 100644 (file)
@@ -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);
index 5889898..7abf34c 100644 (file)
@@ -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;
 }
 
index 7d280f1..05e6094 100644 (file)
@@ -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;
 }
 
index 9563cf7..2a30ff3 100644 (file)
@@ -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;
 }
 
index f6f60f7..fa65035 100644 (file)
@@ -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;
 }
 
index 13cc548..904d673 100644 (file)
@@ -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;
 }
 
index c70cb25..c1d861a 100644 (file)
@@ -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;
 }
 
index 4a5493f..d3754e6 100644 (file)
@@ -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;
 }
 
index ccb4d2d..13837e4 100644 (file)
@@ -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;
 }
 
index bcdd6d1..a79ab6d 100644 (file)
@@ -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;
 }
 
index 17708e1..bca190b 100644 (file)
@@ -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;
 }
 
index 06406df..abb2c56 100644 (file)
@@ -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;
 }
 
index c6e74e4..c66b29d 100644 (file)
@@ -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;
 }
 
index c6c5be2..db72794 100644 (file)
@@ -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!
index 1067b35..4abb280 100644 (file)
@@ -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!
index 2fcd672..ff7f465 100644 (file)
@@ -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;
 }
 
index 70c8f4b..747104b 100644 (file)
@@ -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;
 }
 
index 0d46ecf..b1b2464 100644 (file)
@@ -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;
 }
 
index d2c0c59..0c4be62 100644 (file)
@@ -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;
 }
 
index a8d95cf..5d0c6c8 100644 (file)
@@ -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
 
 //
index 9f95441..4a7366a 100644 (file)
@@ -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");
 
index 523d319..5bca0ba 100644 (file)
@@ -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."*<pre>".print_r($FATAL, true)."</pre>");
-
-       // 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
index 27da0b7..46b7a95 100644 (file)
@@ -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");
 
index f8c1a88..e05a1b2 100644 (file)
@@ -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'))) {