Fix for the fix... ;-)
authorRoland Häder <roland@mxchange.org>
Sun, 21 Sep 2008 14:39:41 +0000 (14:39 +0000)
committerRoland Häder <roland@mxchange.org>
Sun, 21 Sep 2008 14:39:41 +0000 (14:39 +0000)
18 files changed:
admin.php
agb.php
beg.php
birthday_confirm.php
doubler.php
img.php
inc/databases.php
inc/functions.php
inc/mysql-connect.php
index.php
lead-confirm.php
login.php
mailid.php
mailid_top.php
ref.php
show_bonus.php
sponsor_confirm.php
surfbar.php

index f73daff..5c6f49d 100644 (file)
--- 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&amp;action=login");
diff --git a/agb.php b/agb.php
index c9c2654..3302830 100644 (file)
--- 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&amp;what=agb");
diff --git a/beg.php b/beg.php
index a7564ce..f4a0bd1 100644 (file)
--- 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
index b9b4242..4d2b005 100644 (file)
@@ -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']);
 
index eab1a6d..87f177f 100644 (file)
@@ -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 8710bd0..df3c725 100644 (file)
--- 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']))
        {
index 1bbe2a3..7bac878 100644 (file)
@@ -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);
index 318af2c..b888b27 100644 (file)
@@ -903,7 +903,7 @@ function LOAD_URL($URL, $addUrlData=true) {
                print("<pre>");
                debug_print_backtrace();
                die("</pre>URL={$URL}");
-               /**/
+               */
                @header ("Location: ".str_replace("&amp;", "&", $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!<br />\n";
                $res = $constCache[$constName];
        } else {
                // Check constant
+               //* DEBUG: */ echo __FUNCTION__.": ".$constName."-RESOLVE!<br />\n";
                if (defined($constName)) $res = (constant($constName) === true);
 
                // Set cache
                $constCache[$constName] = $res;
        }
+       //* DEBUG: */ var_dump($res);
 
        // Return value
        return $res;
index 600eae1..467f218 100644 (file)
@@ -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();
 
index 1af40fc..5a4e263 100644 (file)
--- 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");
 
index 5c80699..0f62cef 100644 (file)
@@ -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");
 
index 4fb124e..e0e72b3 100644 (file)
--- 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&amp;what=login");
index d530bb2..09b03ff 100644 (file)
@@ -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)) {
index 0c54c6f..f2829ac 100644 (file)
@@ -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 dbbff4b..e6e51d7 100644 (file)
--- 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'])
        {
index 6ac941f..45019b9 100644 (file)
@@ -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");
index 85cbbf6..c10f2ce 100644 (file)
@@ -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&amp;what=sponsor_login&hash=";
        if (empty($_GET['hash'])) {
index 57372bd..93510ab 100644 (file)
@@ -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