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
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;
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
}
} 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... ;-)
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);
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... ;-)
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);
// 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);
}
// 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;
}
} // 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;
}
$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;
// 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
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
// 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;
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;
}
require($INC);
}
-if ((sizeof($FATAL) > 0) || (!empty($FATAL[0])))
-{
+if (getTotalFatalErrors() > 0) {
// Main div container
LOAD_TEMPLATE("fatal_header");
// 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);
// 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
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
// 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
// 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
// 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
// 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
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
}
// Add a fatal error message to the queue array
-function ADD_FATAL ($message, $extra="") {
+function addFatalMessage ($message, $extra="") {
global $FATAL;
if (empty($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;
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
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>·</STRONG> ".FATAL_NO.($key + 1).": ".$err."<br />");
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__);
// Are some SQLs found?
if (count($SQLs) == 0) {
// Abort here
- ADD_FATAL(INSTALL_SQL_IMPORT_FAILED);
+ addFatalMessage(INSTALL_SQL_IMPORT_FAILED);
return;
} // END - if
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";
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;
break;
}
} else {
- ADD_FATAL(ALREADY_INSTALLED);
+ addFatalMessage(ALREADY_INSTALLED);
}
//
?>
$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);
}
}
}
} 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);
}
}
}
} 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);
}
}
$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
}
}
} 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);
}
}
} // 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);
}
}
} // 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);
}
}
//* 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);
}
}
// 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
} 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
} // END - if
} else {
// Not found!
- ADD_FATAL(sprintf(MEMBER_SURFBAR_EXECUTE_ACTION_404, $functionName));
+ addFatalMessage(sprintf(MEMBER_SURFBAR_EXECUTE_ACTION_404, $functionName));
}
// Return status
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
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
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?
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
// 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);
}
//
// 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);
}
//
// 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);
}
//
// 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);
}
//
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);
}
//
// 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);
}
//
// 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);
}
//
// 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);
}
//
// 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);
}
//
// 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);
}
//
// 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);
}
//
// 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);
}
//
// 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);
}
//
// 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);
}
//
// 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);
}
//
// 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);
}
//
// 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);
}
//
// 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);
}
//
?>
// 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);
}
//
// 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);
}
//
$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;
}
// 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);
}
//
// 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);
}
//
// 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);
}
//
// 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);
}
//
// 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);
}
//
} 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
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;
}
$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;
}
$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;
}
$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;
}
$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;
}
$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;
}
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;
}
$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;
}
// 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)
$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;
}
$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;
}
$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;
}
$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
// 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'])));
}
//
// 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'])));
}
//
// 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'])));
}
//
// 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'])));
}
//
$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
// 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'])));
}
//
$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;
}
$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;
}
$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;
}
$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;
}
$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;
}
// 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 {
$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;
}
$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;
}
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;
}
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;
}
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;
}
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;
}
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;
}
$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;
}
$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;
}
} 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
// 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);
}
//
// 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);
}
//
} 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
// 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);
}
//
// 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);
}
//
// 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);
}
//
// 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);
}
//
} 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
// 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);
}
//
// 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);
}
//
// 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);
}
//
} 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
// 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);
}
//
} 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;
}
$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");
} 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 (!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 (!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 (!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 (!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;
}
} 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;
}
} 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;
}
} 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;
}
} 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;
}
} 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;
}
} 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;
}
} 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;
}
} 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;
}
} 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;
}
// 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;
}
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);
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;
}
} 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;
}
// 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;
}
} 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;
}
} 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;
}
// 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;
}
} 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;
}
// 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;
}
} 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 (!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;
}
} 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;
}
// 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;
}
$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!
$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!
$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;
}
$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;
}
$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;
}
$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;
}
SQL_CLOSE($link, __FILE__, __LINE__);
} else {
// No database link
- ADD_FATAL(NO_DB_LINK);
+ addFatalMessage(NO_DB_LINK);
}
}
'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
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 {
include (PATH."inc/language.php");
// Maybe you forgot to enter your MySQL data?
- ADD_FATAL(MYSQL_DATA_MISSING);
+ addFatalMessage(MYSQL_DATA_MISSING);
}
} else {
///////////////////////////////////////////////////
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
//
// 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");
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
// 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
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");
$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)
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'))) {