From: Roland Häder Date: Sun, 21 Sep 2008 14:39:41 +0000 (+0000) Subject: Fix for the fix... ;-) X-Git-Url: https://git.mxchange.org/?p=mailer.git;a=commitdiff_plain;h=b56eadb18a023f4d2d712e8936b4dc1ad31fd580 Fix for the fix... ;-) --- diff --git a/admin.php b/admin.php index f73daff908..5c6f49d107 100644 --- a/admin.php +++ b/admin.php @@ -45,7 +45,7 @@ $GLOBALS['module'] = "admin"; $CSS = -1; require ("inc/config.php"); // Is the script installed? -if (defined('mxchange_installed') && (isBooleanConstantAndTrue('mxchange_installed'))) +if (isBooleanConstantAndTrue('mxchange_installed')) { // Simply redirect... :-) LOAD_URL("modules.php?module=admin&action=login"); diff --git a/agb.php b/agb.php index c9c2654fc8..3302830217 100644 --- a/agb.php +++ b/agb.php @@ -45,7 +45,7 @@ $GLOBALS['module'] = "agb"; $CSS = -1; require ("inc/config.php"); // Is the script installed? -if (defined('mxchange_installed') && (isBooleanConstantAndTrue('mxchange_installed'))) +if (isBooleanConstantAndTrue('mxchange_installed')) { // Simply redirect... :-) LOAD_URL("modules.php?module=index&what=agb"); diff --git a/beg.php b/beg.php index a7564ce67c..f4a0bd13f3 100644 --- a/beg.php +++ b/beg.php @@ -49,7 +49,7 @@ $msg = null; require ("inc/config.php"); // Is the script installed? -if (defined('mxchange_installed') && (isBooleanConstantAndTrue('mxchange_installed'))) { +if (isBooleanConstantAndTrue('mxchange_installed')) { // Check for userid if (!empty($_GET['uid'])) { // Init user ID diff --git a/birthday_confirm.php b/birthday_confirm.php index b9b4242e5a..4d2b0058ce 100644 --- a/birthday_confirm.php +++ b/birthday_confirm.php @@ -45,7 +45,7 @@ $GLOBALS['module'] = "birthday_confirm"; $CSS = -1; require ("inc/config.php"); // Is the script installed? -if (defined('mxchange_installed') && (isBooleanConstantAndTrue('mxchange_installed'))) { +if (isBooleanConstantAndTrue('mxchange_installed')) { // Script is installed so let's check for his confirmation link... $uid = bigintval($_GET['uid']); diff --git a/doubler.php b/doubler.php index eab1a6d533..87f177fc6e 100644 --- a/doubler.php +++ b/doubler.php @@ -48,7 +48,7 @@ $CSS = 0; require ("inc/config.php"); // Is the script installed? -if (defined('mxchange_installed') && (isBooleanConstantAndTrue('mxchange_installed'))) +if (isBooleanConstantAndTrue('mxchange_installed')) { // Probe for referral ID if (!empty($_GET['refid'])) $GLOBALS['refid'] = bigintval($_GET['refid']); diff --git a/img.php b/img.php index 8710bd0ba1..df3c72506b 100644 --- a/img.php +++ b/img.php @@ -44,7 +44,7 @@ $GLOBALS['module'] = "img"; $CSS = -1; // Load the required file(s) require ("inc/config.php"); -if (defined('mxchange_installed') && (isBooleanConstantAndTrue('mxchange_installed'))) +if (isBooleanConstantAndTrue('mxchange_installed')) { if (!empty($_GET['code'])) { diff --git a/inc/databases.php b/inc/databases.php index 1bbe2a3293..7bac8788d1 100644 --- a/inc/databases.php +++ b/inc/databases.php @@ -113,7 +113,7 @@ define('USAGE_BASE', "usage"); define('SERVER_URL', "http://www.mxchange.org"); // This current patch level -define('CURR_SVN_REVISION', "377"); +define('CURR_SVN_REVISION', "378"); // Take a prime number which is long (if you know a longer one please try it out!) define('_PRIME', 591623); diff --git a/inc/functions.php b/inc/functions.php index 318af2c226..b888b2779f 100644 --- a/inc/functions.php +++ b/inc/functions.php @@ -903,7 +903,7 @@ function LOAD_URL($URL, $addUrlData=true) { print("
");
 		debug_print_backtrace();
 		die("
URL={$URL}"); - /**/ + */ @header ("Location: ".str_replace("&", "&", $URL)); } else { // Output error message @@ -2227,14 +2227,17 @@ function isBooleanConstantAndTrue($constName) { // : Boolean // In cache? if (isset($constCache[$constName])) { // Use cache + //* DEBUG: */ echo __FUNCTION__.": ".$constName."-CACHE!
\n"; $res = $constCache[$constName]; } else { // Check constant + //* DEBUG: */ echo __FUNCTION__.": ".$constName."-RESOLVE!
\n"; if (defined($constName)) $res = (constant($constName) === true); // Set cache $constCache[$constName] = $res; } + //* DEBUG: */ var_dump($res); // Return value return $res; diff --git a/inc/mysql-connect.php b/inc/mysql-connect.php index 600eae1053..467f21827a 100644 --- a/inc/mysql-connect.php +++ b/inc/mysql-connect.php @@ -49,6 +49,11 @@ require_once(PATH."inc/db/lib.php"); // Load general functions require_once(PATH."inc/functions.php"); // Non-database functions + +// Load more include files +require_once(PATH."inc/mysql-manager.php"); // Functions which interact with the database + +// Load extensions and language require_once(PATH."inc/extensions.php"); require_once(PATH."inc/language.php"); @@ -69,7 +74,7 @@ if ((empty($MySQL['login'])) && (!defined('mxchange_installing')) && (!isset($_G } // Check if this file is writeable or read-only and warn the user -if ((!defined('mxchange_installing')) && (isBooleanConstantAndTrue('mxchange_installed'))) { +if ((!isBooleanConstantAndTrue('mxchange_installing')) && (isBooleanConstantAndTrue('mxchange_installed'))) { // Check for write-permission for config.php and inc directory if (empty($GLOBALS['module'])) $GLOBALS['module'] = "index"; if (($GLOBALS['module'] != "admin") && (isBooleanConstantAndTrue('admin_registered')) && (!isset($_SERVER['WINDIR']))) { @@ -91,9 +96,6 @@ if ((!defined('mxchange_installing')) && (isBooleanConstantAndTrue('mxchange_ins // Is it a valid resource? if ($db === true) { - // Load more include files - require_once(PATH."inc/mysql-manager.php"); // Functions which interact with the database - // Load configuration stuff $_CONFIG = LOAD_CONFIG(); diff --git a/index.php b/index.php index 1af40fcdb5..5a4e26340b 100644 --- a/index.php +++ b/index.php @@ -46,7 +46,7 @@ $GLOBALS['module'] = "index"; require ("inc/config.php"); // Is the script installed? -if (defined('mxchange_installed') && (isBooleanConstantAndTrue('mxchange_installed'))) { +if (isBooleanConstantAndTrue('mxchange_installed')) { // Header require(PATH."inc/header.php"); diff --git a/lead-confirm.php b/lead-confirm.php index 5c806993e1..0f62cef8d7 100644 --- a/lead-confirm.php +++ b/lead-confirm.php @@ -46,7 +46,7 @@ $GLOBALS['module'] = "lead-confirm"; require ("inc/config.php"); // Is the script installed? -if (defined('mxchange_installed') && (isBooleanConstantAndTrue('mxchange_installed'))) { +if (isBooleanConstantAndTrue('mxchange_installed')) { // Header require(PATH."inc/header.php"); diff --git a/login.php b/login.php index 4fb124e607..e0e72b32ac 100644 --- a/login.php +++ b/login.php @@ -45,7 +45,7 @@ $GLOBALS['module'] = "login"; require ("inc/config.php"); // Is the script installed? -if (defined('mxchange_installed') && (isBooleanConstantAndTrue('mxchange_installed'))) +if (isBooleanConstantAndTrue('mxchange_installed')) { // Simply redirect... :-) LOAD_URL("modules.php?module=index&what=login"); diff --git a/mailid.php b/mailid.php index d530bb2a3b..09b03ff383 100644 --- a/mailid.php +++ b/mailid.php @@ -44,7 +44,7 @@ $GLOBALS['module'] = "mailid"; $CSS = -1; // Load the required file(s) require ("inc/config.php"); -if (defined('mxchange_installed') && (isBooleanConstantAndTrue('mxchange_installed'))) +if (isBooleanConstantAndTrue('mxchange_installed')) { // Is the extension active if (!EXT_IS_ACTIVE("mailid", true)) { diff --git a/mailid_top.php b/mailid_top.php index 0c54c6fc9b..f2829ac315 100644 --- a/mailid_top.php +++ b/mailid_top.php @@ -44,7 +44,7 @@ $GLOBALS['module'] = "mailid"; $CSS = 0; // Load the required file(s) require ("inc/config.php"); -if (defined('mxchange_installed') && (isBooleanConstantAndTrue('mxchange_installed'))) +if (isBooleanConstantAndTrue('mxchange_installed')) { // Is the extension active if (!EXT_IS_ACTIVE("mailid", true)) { diff --git a/ref.php b/ref.php index dbbff4b257..e6e51d7b83 100644 --- a/ref.php +++ b/ref.php @@ -45,7 +45,7 @@ $GLOBALS['module'] = "ref"; $CSS = -1; require ("inc/config.php"); // Redirect only to registration page when this script is installed -if (defined('mxchange_installed') && (isBooleanConstantAndTrue('mxchange_installed'))) { +if (isBooleanConstantAndTrue('mxchange_installed')) { // Base URL for redirection switch ($_CONFIG['refid_target']) { diff --git a/show_bonus.php b/show_bonus.php index 6ac941f49f..45019b90f6 100644 --- a/show_bonus.php +++ b/show_bonus.php @@ -46,7 +46,7 @@ $GLOBALS['module'] = "show_bonus"; $CSS = 0; require ("inc/config.php"); // List only rankings when script is installed -if (defined('mxchange_installed') && (isBooleanConstantAndTrue('mxchange_installed'))) +if (isBooleanConstantAndTrue('mxchange_installed')) { // Include header include(PATH."inc/header.php"); diff --git a/sponsor_confirm.php b/sponsor_confirm.php index 85cbbf61c9..c10f2cef31 100644 --- a/sponsor_confirm.php +++ b/sponsor_confirm.php @@ -37,7 +37,7 @@ require_once("inc/libs/security_functions.php"); require ("inc/config.php"); // Is the script installed? -if (defined('mxchange_installed') && (isBooleanConstantAndTrue('mxchange_installed'))) { +if (isBooleanConstantAndTrue('mxchange_installed')) { // Base URL for redirection $URL = URL."/modules.php?module=index&what=sponsor_login&hash="; if (empty($_GET['hash'])) { diff --git a/surfbar.php b/surfbar.php index 57372bdd69..93510abffa 100644 --- a/surfbar.php +++ b/surfbar.php @@ -50,7 +50,7 @@ $msg = null; require ("inc/config.php"); // Is the script installed? -if (defined('mxchange_installed') && (isBooleanConstantAndTrue('mxchange_installed'))) { +if (isBooleanConstantAndTrue('mxchange_installed')) { // Only logged in users may use this surfbar! if (!IS_MEMBER()) { // Redirect