More rewrites of constants and fix for loading mass-included scripts by GET_DIR_AS_AR...
authorRoland Häder <roland@mxchange.org>
Sun, 1 Mar 2009 02:52:57 +0000 (02:52 +0000)
committerRoland Häder <roland@mxchange.org>
Sun, 1 Mar 2009 02:52:57 +0000 (02:52 +0000)
41 files changed:
admin.php
agb.php
beg.php
birthday_confirm.php
confirm.php
debug.php
doubler.php
img.php
inc/autopurge.php
inc/check-reset.php
inc/extensions.php
inc/extensions/ext-order.php
inc/fatal_errors.php
inc/filters.php
inc/functions.php
inc/header.php
inc/install-inc.php
inc/language/de.php
inc/language/en.php
inc/language/install_de.php
inc/load_cache.php
inc/load_extensions.php
inc/modules/admin.php
inc/modules/admin/admin-inc.php
inc/mysql-connect.php
inc/mysql-manager.php
inc/pool-update.php
inc/request-functions.php
inc/stylesheet.php
index.php
install.php
js.php
lead-confirm.php
login.php
mailid.php
mailid_top.php
ref.php
show_bonus.php
sponsor_confirm.php
sponsor_ref.php
surfbar.php

index 97c2630822138078d590213a51edce7ba0603625..c2beb5939a5942e448246816ed9b640d288c27aa 100644 (file)
--- a/admin.php
+++ b/admin.php
@@ -46,7 +46,7 @@ $GLOBALS['output_mode'] = -1;
 require("inc/config.php");
 
 // Is the script installed?
 require("inc/config.php");
 
 // Is the script installed?
-if (isBooleanConstantAndTrue('mxchange_installed')) {
+if (isInstalled()) {
        // Simply redirect... :-)
        LOAD_URL("modules.php?module=admin");
 } else {
        // Simply redirect... :-)
        LOAD_URL("modules.php?module=admin");
 } else {
diff --git a/agb.php b/agb.php
index adf6172c29460f86ac47541d73083c8eace89142..a98ef75758ebb1f1488f5ba1fec0ed40190778b5 100644 (file)
--- a/agb.php
+++ b/agb.php
@@ -46,7 +46,7 @@ $GLOBALS['output_mode'] = -1;
 require("inc/config.php");
 
 // Is the script installed?
 require("inc/config.php");
 
 // Is the script installed?
-if (isBooleanConstantAndTrue('mxchange_installed')) {
+if (isInstalled()) {
        // Simply redirect... :-)
        LOAD_URL("modules.php?module=index&amp;what=agb");
 } else {
        // Simply redirect... :-)
        LOAD_URL("modules.php?module=index&amp;what=agb");
 } else {
diff --git a/beg.php b/beg.php
index bcc39658e6b1b83cab5b098f1a297fd0e1ca5276..ab2817211a5a5265c6ad2f70ceedad3260955746 100644 (file)
--- a/beg.php
+++ b/beg.php
@@ -52,7 +52,7 @@ require("inc/config.php");
 REDIRCT_ON_UNINSTALLED_EXTENSION("beg");
 
 // Is the script installed?
 REDIRCT_ON_UNINSTALLED_EXTENSION("beg");
 
 // Is the script installed?
-if (isBooleanConstantAndTrue('mxchange_installed')) {
+if (isInstalled()) {
        // Check for userid
        if (REQUEST_ISSET_GET(('uid'))) {
                // Init variables
        // Check for userid
        if (REQUEST_ISSET_GET(('uid'))) {
                // Init variables
index 47bb1753b9006697d7e171efb3e66eac3be1ff93..bb38a1eb309db8b9ef6febbff2e7020e1584753b 100644 (file)
@@ -49,7 +49,7 @@ require("inc/config.php");
 REDIRECT_ON_UNINSTALLED_EXTENSION("birthday");
 
 // Is the script installed?
 REDIRECT_ON_UNINSTALLED_EXTENSION("birthday");
 
 // Is the script installed?
-if (isBooleanConstantAndTrue('mxchange_installed')) {
+if (isInstalled()) {
        // Script is installed so let's check for his confirmation link...
        $uid = bigintval(REQUEST_GET('uid'));
 
        // Script is installed so let's check for his confirmation link...
        $uid = bigintval(REQUEST_GET('uid'));
 
index a865009f7cd08b7843557e3330eff071d85850fc..cf27796429a14bf4027ce490db1765970fb28df9 100644 (file)
@@ -46,7 +46,7 @@ $GLOBALS['output_mode'] = -1;
 require("inc/config.php");
 
 // Is the script installed?
 require("inc/config.php");
 
 // Is the script installed?
-if (defined('mxchange_installed') && (isBooleanConstantAndTrue('mxchange_installed')) && (isBooleanConstantAndTrue('admin_registered'))) {
+if ((isInstalled()) && (isAdminRegistered())) {
        // Base URL for redirection
        $URL = "modules.php?module=index&amp;what=confirm&hash=";
        if (!REQUEST_ISSET_GET(('hash'))) {
        // Base URL for redirection
        $URL = "modules.php?module=index&amp;what=confirm&hash=";
        if (!REQUEST_ISSET_GET(('hash'))) {
index 533676e3f9fe6fabca4ecfe93110740bcdb5dc9c..01198f58f5bee6ce650cb69f96cf29910474004c 100644 (file)
--- a/debug.php
+++ b/debug.php
@@ -46,7 +46,7 @@ $GLOBALS['output_mode'] = -1;
 require("inc/config.php");
 
 // Redirect only to registration page when this script is installed
 require("inc/config.php");
 
 // Redirect only to registration page when this script is installed
-if ((isBooleanConstantAndTrue('mxchange_installed')) && (getTotalFatalErrors() == 0)) {
+if ((isInstalled()) && (getTotalFatalErrors() == 0)) {
        // Is the extension installed?
        if (!EXT_IS_ACTIVE("debug")) {
                // Then abort here
        // Is the extension installed?
        if (!EXT_IS_ACTIVE("debug")) {
                // Then abort here
index b3292fbecf5fd814b5ebe31ba2ba0edd3e741b7f..983653ddaa6a4a829de321fdca69bcf708aaa6f2 100644 (file)
@@ -51,7 +51,7 @@ require("inc/config.php");
 REDIRECT_ON_UNINSTALLED_EXTENSION("doubler");
 
 // Is the script installed?
 REDIRECT_ON_UNINSTALLED_EXTENSION("doubler");
 
 // Is the script installed?
-if (isBooleanConstantAndTrue('mxchange_installed')) {
+if (isInstalled()) {
        // Probe for referal ID
        if (REQUEST_ISSET_GET(('refid'))) $GLOBALS['refid'] = REQUEST_GET(('refid'));
 
        // Probe for referal ID
        if (REQUEST_ISSET_GET(('refid'))) $GLOBALS['refid'] = REQUEST_GET(('refid'));
 
diff --git a/img.php b/img.php
index 6cf27a6fe48ee54fc03b3b45e77bbf7508b55fc9..fa539416362c4fb201d3448b7a78ab98b7a87890 100644 (file)
--- a/img.php
+++ b/img.php
@@ -46,7 +46,7 @@ $GLOBALS['output_mode'] = -1;
 require("inc/config.php");
 
 // Script installed?
 require("inc/config.php");
 
 // Script installed?
-if (isBooleanConstantAndTrue('mxchange_installed')) {
+if (isInstalled()) {
        // Load header
        LOAD_INC_ONCE("inc/header.php");
 
        // Load header
        LOAD_INC_ONCE("inc/header.php");
 
index 8f2e72a208e683e053d724c893464283f701541a..262bc3d1f3518bfc4a12d4a8c31af111fab6a050 100644 (file)
@@ -38,7 +38,7 @@ if (!defined('__SECURITY')) {
 } // END - if
 
 // Load all includes
 } // END - if
 
 // Load all includes
-$INC_POOL = GET_DIR_AS_ARRAY(constant('PATH')."inc/autopurge/", "purge-");
+$INC_POOL = GET_DIR_AS_ARRAY("inc/autopurge/", "purge-");
 
 // Run the filter
 RUN_FILTER('load_includes', $INC_POOL);
 
 // Run the filter
 RUN_FILTER('load_includes', $INC_POOL);
index 7de291abbfe311f37bc7668a2524a4237feb0c7a..45c59f4341294693073bc75e6bc6770ddfb9ea4f 100644 (file)
@@ -38,7 +38,7 @@ if (!defined('__SECURITY')) {
 }
 
 // 01    2              3             32        2         3321    12        3                     32    2                    21    1                        2                    21    1                        2                  21    1                  23          321    1                            10
 }
 
 // 01    2              3             32        2         3321    12        3                     32    2                    21    1                        2                    21    1                        2                  21    1                  23          321    1                            10
-if ((date("d", getConfig('last_update')) != date("d", time())) && ((!defined('mxchange_installing')) || (!mxchange_installing)) && (isBooleanConstantAndTrue('mxchange_installed')) && (isBooleanConstantAndTrue('admin_registered')) && (!REQUEST_ISSET_GET(('register'))) && ($GLOBALS['output_mode'] != 1)) {
+if ((date("d", getConfig('last_update')) != date("d", time())) && ((!defined('mxchange_installing')) || (!mxchange_installing)) && (isInstalled()) && (isAdminRegistered()) && (!REQUEST_ISSET_GET(('register'))) && ($GLOBALS['output_mode'] != 1)) {
        // Do daily things in external PHP file but only when script is completely setup
        // Daily reset was run!
        define('__DAILY_RESET', true);
        // Do daily things in external PHP file but only when script is completely setup
        // Daily reset was run!
        define('__DAILY_RESET', true);
index dabaadb743c38acbbab7a797ed70faee229a1df2..ba65fb3649aec021a10536b64bc80071e3eab821 100644 (file)
@@ -320,7 +320,7 @@ function EXTENSION_RUN_SQLS ($ext_id, $load_mode) {
 // Check if given extension is active
 function EXT_IS_ACTIVE ($ext_name) {
        // Extensions are all inactive during installation
 // Check if given extension is active
 function EXT_IS_ACTIVE ($ext_name) {
        // Extensions are all inactive during installation
-       if ((!isBooleanConstantAndTrue('mxchange_installed')) || (isInstalling()) || (empty($ext_name))) return false;
+       if ((!isInstalled()) || (isInstalling()) || (empty($ext_name))) return false;
 
        // Not active is the default
        $active = "N";
 
        // Not active is the default
        $active = "N";
@@ -372,7 +372,7 @@ function GET_EXT_VERSION ($ext_name) {
        $ext_ver = false;
 
        // Extensions are all inactive during installation
        $ext_ver = false;
 
        // Extensions are all inactive during installation
-       if ((!isBooleanConstantAndTrue('mxchange_installed')) || (isInstalling())) return "";
+       if ((!isInstalled()) || (isInstalling())) return "";
        //* DEBUG: */ DEBUG_LOG(__FUNCTION__, __LINE__, ": ext_name={$ext_name}");
 
        // Is the cache written?
        //* DEBUG: */ DEBUG_LOG(__FUNCTION__, __LINE__, ": ext_name={$ext_name}");
 
        // Is the cache written?
@@ -759,8 +759,8 @@ function MODULE_HAS_MENU ($mod, $forceDb = false) {
                // Free memory
                SQL_FREERESULT($result);
        } elseif (GET_EXT_VERSION("sql_patches") == "") {
                // Free memory
                SQL_FREERESULT($result);
        } elseif (GET_EXT_VERSION("sql_patches") == "") {
-               // No sql_patches installed, so maybe in admin area?
-               $ret = ((IS_ADMIN()) && ($mod == "admin")); // Then there is a menu!
+               // No sql_patches installed, so maybe in admin area or no admin registered?
+               $ret = (((IS_ADMIN()) || (!isAdminRegistered())) && ($mod == "admin")); // Then there is a menu!
        }
 
        // Return status
        }
 
        // Return status
index 6112f61c6d59b34372f1fba4e50c7df6cc921f27..f3435cc4014289364913f45e6c7bfaa4821c5cb6 100644 (file)
@@ -320,7 +320,7 @@ case "test": // For testing purposes. For details see file inc/modules/admin/wha
 
 default: // Do stuff when extension is loaded
        // Do daily reset only when installed and extension version is at least 0.1.1
 
 default: // Do stuff when extension is loaded
        // Do daily reset only when installed and extension version is at least 0.1.1
-       if ((isBooleanConstantAndTrue('__DAILY_RESET')) && (isBooleanConstantAndTrue('mxchange_installed')) && (isBooleanConstantAndTrue('mxchange_installed')) && (isBooleanConstantAndTrue('admin_registered')) && (GET_EXT_VERSION("order") >= "0.1.1")) {
+       if ((isBooleanConstantAndTrue('__DAILY_RESET')) && (isInstalled()) && (isAdminRegistered()) && (GET_EXT_VERSION("order") >= "0.1.1")) {
                // Reset mail order values
                $result_ext = SQL_QUERY("UPDATE `{!_MYSQL_PREFIX!}_user_data` SET mail_orders=0 WHERE mail_orders > 0", __FILE__, __LINE__);
        } // END - if
                // Reset mail order values
                $result_ext = SQL_QUERY("UPDATE `{!_MYSQL_PREFIX!}_user_data` SET mail_orders=0 WHERE mail_orders > 0", __FILE__, __LINE__);
        } // END - if
index a336a41483a0338234707ba2fdb839770ecc98f8..57d133bec66e1e887f7e8d41638e312a5d65c3ce 100644 (file)
@@ -59,7 +59,7 @@ if (getTotalFatalErrors() > 0) {
 
                // Load main template
                LOAD_TEMPLATE("install_fatal_table", false, $OUT);
 
                // Load main template
                LOAD_TEMPLATE("install_fatal_table", false, $OUT);
-       } elseif (isBooleanConstantAndTrue('mxchange_installed')) {
+       } elseif (isInstalled()) {
                // Display all runtime fatal errors
                $OUT = "";
                foreach (getFatalArray() as $key => $value) {
                // Display all runtime fatal errors
                $OUT = "";
                foreach (getFatalArray() as $key => $value) {
index 64de90acd5085ad54d94acc9ac8b202b1d983f42..ebed4a6034f5a088c5e033e2d90ea787247fe58e 100644 (file)
@@ -103,6 +103,7 @@ ORDER BY `filter_id` ASC", __FILE__, __LINE__);
        // Init filters
        REGISTER_FILTER('init', 'UPDATE_LOGIN_DATA');
        REGISTER_FILTER('init', 'INIT_RANDOMIZER');
        // Init filters
        REGISTER_FILTER('init', 'UPDATE_LOGIN_DATA');
        REGISTER_FILTER('init', 'INIT_RANDOMIZER');
+       REGISTER_FILTER('init', 'INIT_MEM_CACHE');
 
        // Login failures handler
        REGISTER_FILTER('post_youhere_line', 'CALL_HANDLER_LOGIN_FAILTURES');
 
        // Login failures handler
        REGISTER_FILTER('post_youhere_line', 'CALL_HANDLER_LOGIN_FAILTURES');
@@ -505,5 +506,11 @@ function FILTER_INIT_RANDOMIZER () {
        mt_srand(generateSeed() + constant('_ADD'));
 }
 
        mt_srand(generateSeed() + constant('_ADD'));
 }
 
+// Filter for initializing misc mem-cache arrays (NOT memcache!)
+function FILTER_INIT_MEM_CACHE () {
+       // For LOAD_INC_ONCE()
+       $GLOBALS['cache_array']['load_once'] = array();
+}
+
 //
 ?>
 //
 ?>
index f353494c6dfd451aeb50a8a1e3dffcfbb00861bd..7d96a7ed02e20f7a8627474bd08c1c7a6bafe269 100644 (file)
@@ -356,7 +356,7 @@ function LOAD_TEMPLATE ($template, $return=false, $content=array()) {
 
                // Add surrounding HTML comments to help finding bugs faster
                $ret = "<!-- Template ".$template." - Start -->\n".$ret."<!-- Template ".$template." - End -->\n";
 
                // Add surrounding HTML comments to help finding bugs faster
                $ret = "<!-- Template ".$template." - Start -->\n".$ret."<!-- Template ".$template." - End -->\n";
-       } elseif ((IS_ADMIN()) || ((isInstalling()) && (!isBooleanConstantAndTrue('mxchange_installed')))) {
+       } elseif ((IS_ADMIN()) || ((isInstalling()) && (!isInstalled()))) {
                // Only admins shall see this warning or when installation mode is active
                $ret = "<br /><span class=\"guest_failed\">".TEMPLATE_404."</span><br />
 (".basename($FQFN).")<br />
                // Only admins shall see this warning or when installation mode is active
                $ret = "<br /><span class=\"guest_failed\">".TEMPLATE_404."</span><br />
 (".basename($FQFN).")<br />
@@ -925,6 +925,7 @@ function LOAD_URL ($URL, $addUrlData=true) {
 
        // Get output buffer
        //* DEBUG: */ debug_report_bug(sprintf("%s[%s:] URL=%s", __FUNCTION__, __LINE__, $URL));
 
        // Get output buffer
        //* DEBUG: */ debug_report_bug(sprintf("%s[%s:] URL=%s", __FUNCTION__, __LINE__, $URL));
+       DEBUG_LOG(__FUNCTION__, __LINE__, $URL);
        $OUTPUT = ob_get_contents();
 
        // Clear it only if there is content
        $OUTPUT = ob_get_contents();
 
        // Clear it only if there is content
@@ -2377,7 +2378,7 @@ function GET_CURR_THEME() {
                        // Fix it to default
                        $ret = "default";
                } // END - if
                        // Fix it to default
                        $ret = "default";
                } // END - if
-       } elseif ((!isBooleanConstantAndTrue('mxchange_installed')) && ((isInstalling()) || ($GLOBALS['output_mode'] == true)) && ((REQUEST_ISSET_GET(('theme'))) || (REQUEST_ISSET_POST(('theme'))))) {
+       } elseif ((!isInstalled()) && ((isInstalling()) || ($GLOBALS['output_mode'] == true)) && ((REQUEST_ISSET_GET(('theme'))) || (REQUEST_ISSET_POST(('theme'))))) {
                // Prepare FQFN for checking
                $theme = sprintf("%stheme/%s/theme.php", constant('PATH'), REQUEST_GET(('theme')));
 
                // Prepare FQFN for checking
                $theme = sprintf("%stheme/%s/theme.php", constant('PATH'), REQUEST_GET(('theme')));
 
@@ -2982,13 +2983,13 @@ function GET_DIR_AS_ARRAY ($baseDir, $prefix) {
        $INCs = array();
 
        // Open directory
        $INCs = array();
 
        // Open directory
-       $dirPointer = opendir($baseDir) or mxchange_die("Cannot read ".basename($baseDir)." path!");
+       $dirPointer = opendir(constant('PATH') . $baseDir) or mxchange_die("Cannot read ".basename($baseDir)." path!");
 
        // Read all entries
        while ($baseFile = readdir($dirPointer)) {
                // Load file only if extension is active
 
        // Read all entries
        while ($baseFile = readdir($dirPointer)) {
                // Load file only if extension is active
-               // Make full path
-               $FQFN = $baseDir.$baseFile;
+               $INC = $baseDir.$baseFile;
+               $FQFN = constant('PATH') . $INC;
 
                // Is this a valid reset file?
                //* DEBUG: */ print __FUNCTION__."(<font color=\"#0000aa\">".__LINE__."</font>):baseDir={$baseDir},prefix={$prefix},baseFile={$baseFile}<br />\n";
 
                // Is this a valid reset file?
                //* DEBUG: */ print __FUNCTION__."(<font color=\"#0000aa\">".__LINE__."</font>):baseDir={$baseDir},prefix={$prefix},baseFile={$baseFile}<br />\n";
@@ -3002,10 +3003,10 @@ function GET_DIR_AS_ARRAY ($baseDir, $prefix) {
                        // Is the extension valid and active?
                        if (($extId > 0) && (EXT_IS_ACTIVE($extName))) {
                                // Then add this file
                        // Is the extension valid and active?
                        if (($extId > 0) && (EXT_IS_ACTIVE($extName))) {
                                // Then add this file
-                               $INCs[] = $FQFN;
+                               $INCs[] = $INC;
                        } elseif ($extId == 0) {
                                // Add non-extension files as well
                        } elseif ($extId == 0) {
                                // Add non-extension files as well
-                               $INCs[] = $FQFN;
+                               $INCs[] = $INC;
                        }
                } // END - if
        } // END - while
                        }
                } // END - if
        } // END - while
@@ -3029,7 +3030,7 @@ function RESET_ADD_INCLUDES () {
        } // END - if
 
        // Get more daily reset scripts
        } // END - if
 
        // Get more daily reset scripts
-       $INC_POOL = GET_DIR_AS_ARRAY(constant('PATH')."inc/reset/", "reset_");
+       $INC_POOL = GET_DIR_AS_ARRAY("inc/reset/", "reset_");
 
        // Update database
        if (!defined('DEBUG_RESET')) UPDATE_CONFIG("last_update", time());
 
        // Update database
        if (!defined('DEBUG_RESET')) UPDATE_CONFIG("last_update", time());
@@ -3040,7 +3041,7 @@ function RESET_ADD_INCLUDES () {
        // Has it changed?
        if (getConfig('last_week') != $currWeek) {
                // Include weekly reset scripts
        // Has it changed?
        if (getConfig('last_week') != $currWeek) {
                // Include weekly reset scripts
-               $INC_POOL = merge_array($INC_POOL, GET_DIR_AS_ARRAY(constant('PATH')."inc/weekly/", "weekly_"));
+               $INC_POOL = merge_array($INC_POOL, GET_DIR_AS_ARRAY("inc/weekly/", "weekly_"));
 
                // Update config
                if (!defined('DEBUG_WEEKLY')) UPDATE_CONFIG("last_week", $currWeek);
 
                // Update config
                if (!defined('DEBUG_WEEKLY')) UPDATE_CONFIG("last_week", $currWeek);
@@ -3052,7 +3053,7 @@ function RESET_ADD_INCLUDES () {
        // Has it changed?
        if (getConfig('last_month') != $currMonth) {
                // Include monthly reset scripts
        // Has it changed?
        if (getConfig('last_month') != $currMonth) {
                // Include monthly reset scripts
-               $INC_POOL = merge_array($INC_POOL, GET_DIR_AS_ARRAY(constant('PATH')."inc/monthly/", "monthly_"));
+               $INC_POOL = merge_array($INC_POOL, GET_DIR_AS_ARRAY("inc/monthly/", "monthly_"));
 
                // Update config
                if (!defined('DEBUG_MONTHLY')) UPDATE_CONFIG("last_month", $currMonth);
 
                // Update config
                if (!defined('DEBUG_MONTHLY')) UPDATE_CONFIG("last_month", $currMonth);
@@ -3392,6 +3393,16 @@ function isInstalling () {
        return (isset($GLOBALS['mxchange_installing']));
 }
 
        return (isset($GLOBALS['mxchange_installing']));
 }
 
+// Check wether this script is installed
+function isInstalled () {
+       return isBooleanConstantAndTrue('mxchange_installed');
+}
+
+// Check wether an admin is registered
+function isAdminRegistered () {
+       return isBooleanConstantAndTrue('admin_registered');
+}
+
 //////////////////////////////////////////////////
 // AUTOMATICALLY RE-GENERATED MISSING FUNCTIONS //
 //////////////////////////////////////////////////
 //////////////////////////////////////////////////
 // AUTOMATICALLY RE-GENERATED MISSING FUNCTIONS //
 //////////////////////////////////////////////////
index 723933c17985a7ec672ef9d9051dc3d6bdc868dc..226c9918cd4eceb973edfc88402c1a80cfa19b8e 100644 (file)
@@ -76,7 +76,10 @@ if (($GLOBALS['header_sent'] != "1") && ($GLOBALS['header_sent'] != "2")) {
 
                                // Remember title in constant for the template
                                define('__PAGE_TITLE', $TITLE);
 
                                // Remember title in constant for the template
                                define('__PAGE_TITLE', $TITLE);
-                       } elseif ((!isBooleanConstantAndTrue('mxchange_installed')) || (!isBooleanConstantAndTrue('admin_registered'))) {
+                       } elseif ((!isInstalled()) || (!isAdminRegistered())) {
+                               // Load language here
+                               LOAD_INC_ONCE("inc/language.php");
+
                                // Installation mode
                                define('__PAGE_TITLE', getMessage('INSTALLATION_OF_MXCHANGE'));
                        } else {
                                // Installation mode
                                define('__PAGE_TITLE', getMessage('INSTALLATION_OF_MXCHANGE'));
                        } else {
@@ -100,7 +103,7 @@ if (($GLOBALS['header_sent'] != "1") && ($GLOBALS['header_sent'] != "2")) {
                        LOAD_TEMPLATE("metadata");
 
                        // Add meta description to header
                        LOAD_TEMPLATE("metadata");
 
                        // Add meta description to header
-                       if ((isBooleanConstantAndTrue('mxchange_installed')) && (isBooleanConstantAndTrue('admin_registered')) && (SQL_IS_LINK_UP())) {
+                       if ((isInstalled()) && (isAdminRegistered()) && (SQL_IS_LINK_UP())) {
                                // Add meta description not in admin and login module and when the script is installed
                                META_DESCRIPTION($GLOBALS['module'], $GLOBALS['what']);
                        } // END - if
                                // Add meta description not in admin and login module and when the script is installed
                                META_DESCRIPTION($GLOBALS['module'], $GLOBALS['what']);
                        } // END - if
index 1ad0dbc5ca8ae3cd2033320d32f505eec7afeebf..065726a9d276ca44e3bd7bc80caefb4e1059c565 100644 (file)
@@ -74,7 +74,7 @@ if ((REQUEST_ISSET_GET(('page')) && (REQUEST_GET('page') == 5))) {
 } // END - if
 
 // Is MXChange installed or no admin registered so far?
 } // END - if
 
 // Is MXChange installed or no admin registered so far?
-if ((!isBooleanConstantAndTrue('mxchange_installed')) || (!isBooleanConstantAndTrue('admin_registered')))
+if ((!isInstalled()) || (!isAdminRegistered()))
 {
        // Set URL for FORM actions
        define('__BURL_ACTION', constant('URL'));
 {
        // Set URL for FORM actions
        define('__BURL_ACTION', constant('URL'));
@@ -264,7 +264,7 @@ if ((!isBooleanConstantAndTrue('mxchange_installed')) || (!isBooleanConstantAndT
                break;
 
        case "finalize": // Write captured data to files
                break;
 
        case "finalize": // Write captured data to files
-               if ((REQUEST_ISSET_POST(('finalize'))) && (!isBooleanConstantAndTrue('mxchange_installed'))) {
+               if ((REQUEST_ISSET_POST(('finalize'))) && (!isInstalled())) {
                        // You have submitted data then we have to reset the fatal messages
                        $SQLs = array();
 
                        // You have submitted data then we have to reset the fatal messages
                        $SQLs = array();
 
@@ -360,7 +360,7 @@ if ((!isBooleanConstantAndTrue('mxchange_installed')) || (!isBooleanConstantAndT
                                // Installation is done!
                                LOAD_URL("install.php?page=finalize");
                        }
                                // Installation is done!
                                LOAD_URL("install.php?page=finalize");
                        }
-               } elseif (isBooleanConstantAndTrue('mxchange_installed')) {
+               } elseif (isInstalled()) {
                        // Redirection after writing data... :-)
                        LOAD_TEMPLATE("install_finished");
                } else {
                        // Redirection after writing data... :-)
                        LOAD_TEMPLATE("install_finished");
                } else {
index dbe56aa7c60d663f0f956809c3015f2665ee27fe..eb063ea9a84713a7897780cfa44e3ff659490082 100644 (file)
@@ -37,9 +37,6 @@ if (!defined('__SECURITY')) {
        require($INC);
 }
 
        require($INC);
 }
 
-// Language identifier
-define('__LANG_ID', "Deutsch (Dtl.)");
-
 // Installation/setup
 define('CONFIG_IS_WRITE_PROTECTED', "Die Konfigurationsdatei <strong>inc/config.php</strong> ist schreibgesch&uuml;tzt. Bitte setzen Sie CHMOD 666 auf die Datei!");
 define('DUMMY_IS_WRITE_PROTECTED', "In dem Verzeichnis <strong>inc/</strong> kann keine Datei erzeugt werden. Bitte setzen Sie CHMOD 777 auf das Verzeichnis!");
 // Installation/setup
 define('CONFIG_IS_WRITE_PROTECTED', "Die Konfigurationsdatei <strong>inc/config.php</strong> ist schreibgesch&uuml;tzt. Bitte setzen Sie CHMOD 666 auf die Datei!");
 define('DUMMY_IS_WRITE_PROTECTED', "In dem Verzeichnis <strong>inc/</strong> kann keine Datei erzeugt werden. Bitte setzen Sie CHMOD 777 auf das Verzeichnis!");
index f3bc65839f9838f805e1965424f54c8f62dd56c9..370b41463da8b3d179c32c0d867f38a0fcd698c0 100644 (file)
@@ -37,9 +37,6 @@ if (!defined('__SECURITY')) {
        require($INC);
 }
 
        require($INC);
 }
 
-// Language identifier
-define('__LANG_ID', "English (US)");
-
 // Language definitions
 define('LANG_DOWN_MAINTAINCE', "System is down for maintenance.");
 define('LANG_MOD_REG_404', "Module <u>%s</u> does not exists.");
 // Language definitions
 define('LANG_DOWN_MAINTAINCE', "System is down for maintenance.");
 define('LANG_MOD_REG_404', "Module <u>%s</u> does not exists.");
index ce32e43d8b5b29943b7845138a5c01d8ed98c8d2..c171e777b0ba67dcc9a92ec93feec9fe1e3a313c 100644 (file)
@@ -38,8 +38,6 @@ if (!defined('__SECURITY')) {
 }
 
 // Language definitions
 }
 
 // Language definitions
-define('MT_WORD', "Mailtausch");
-define('MT_WORD2', "Mailtausches");
 define('INSTALLATION_OF_MXCHANGE', "Installation von MXChange-{!MT_WORD!}-Script");
 define('INSTALL_MISSING_DUMPS', "Die SQL-Dumps wurden nicht gefunden! Diese sollten auch mit hochgeladen werden und lesbar sein (CHMOD 644).");
 define('INSTALL_ENABLE_BACKLINK', "Backlink (=R&uuml;ckverlinkung zu mxchange.org setzen?) <em>rel=&quot;external&quot;</em> ist gesetzt. Bitte nicht den Backlink einbauen, und <strong>nofollow</strong> verwenden! Das schadet allen.");
 define('INSTALLATION_OF_MXCHANGE', "Installation von MXChange-{!MT_WORD!}-Script");
 define('INSTALL_MISSING_DUMPS', "Die SQL-Dumps wurden nicht gefunden! Diese sollten auch mit hochgeladen werden und lesbar sein (CHMOD 644).");
 define('INSTALL_ENABLE_BACKLINK', "Backlink (=R&uuml;ckverlinkung zu mxchange.org setzen?) <em>rel=&quot;external&quot;</em> ist gesetzt. Bitte nicht den Backlink einbauen, und <strong>nofollow</strong> verwenden! Das schadet allen.");
index cc441d5d8b5002454823e85ce78d0ec24cd0f088..88d53eaf6ec713595f1a86f4b5f1697c50a79310 100644 (file)
@@ -38,7 +38,7 @@ if (!defined('__SECURITY')) {
 }
 
 // Load more cache includes
 }
 
 // Load more cache includes
-$INC_POOL = GET_DIR_AS_ARRAY(constant('PATH')."inc/loader/", "load_cache-");
+$INC_POOL = GET_DIR_AS_ARRAY("inc/loader/", "load_cache-");
 
 // Run the filter
 RUN_FILTER('load_includes', $INC_POOL);
 
 // Run the filter
 RUN_FILTER('load_includes', $INC_POOL);
index 726591df3daee00f7e50895b2007fd29a86fd892..4c2c33739f8eb8e24a8e595d2e307533590d5480 100644 (file)
@@ -46,7 +46,7 @@ $GLOBALS['cache_instance'] = null;
 $GLOBALS['cache_array'] = array();
 
 // Skip loading extensions
 $GLOBALS['cache_array'] = array();
 
 // Skip loading extensions
-if ((!isBooleanConstantAndTrue('mxchange_installed')) || (isInstalling())) {
+if ((!isInstalled()) || (isInstalling())) {
        // Init filter system here
        INIT_FILTER_SYSTEM();
 
        // Init filter system here
        INIT_FILTER_SYSTEM();
 
index 67f359aa6a960039b212e717211f94cdc4295342..198995ae10a5686dee2201ef647306850404e2f1 100644 (file)
@@ -38,7 +38,7 @@ if (!defined('__SECURITY')) {
 }
 
 // Login is default
 }
 
 // Login is default
-if ((empty($GLOBALS['action'])) && ($check == "admin_only")) {
+if ((empty($GLOBALS['action'])) && (CHECK_MODULE($GLOBALS['module']) == "admin_only")) {
        // Redirect to right URL
        LOAD_URL("modules.php?module=admin&amp;action=login");
 } // END - if
        // Redirect to right URL
        LOAD_URL("modules.php?module=admin&amp;action=login");
 } // END - if
@@ -53,7 +53,7 @@ FIX_DELETED_COOKIES(array('admin_login', 'admin_md5', 'admin_last', 'admin_to'))
 $ret = "init";
 
 // Is no admin registered?
 $ret = "init";
 
 // Is no admin registered?
-if (!isBooleanConstantAndTrue('admin_registered')) {
+if (!isAdminRegistered()) {
        // Admin is not registered so we have to inform the user
        if ((IS_FORM_SENT()) && ((!REQUEST_ISSET_POST(('login'))) || (!REQUEST_ISSET_POST(('pass'))) || (strlen(REQUEST_POST('pass')) < 4))) {
                REQUEST_SET_POST('ok', "***");
        // Admin is not registered so we have to inform the user
        if ((IS_FORM_SENT()) && ((!REQUEST_ISSET_POST(('login'))) || (!REQUEST_ISSET_POST(('pass'))) || (strlen(REQUEST_POST('pass')) < 4))) {
                REQUEST_SET_POST('ok', "***");
@@ -97,7 +97,7 @@ if (!isBooleanConstantAndTrue('admin_registered')) {
                        }
 
                        // Admin still not registered?
                        }
 
                        // Admin still not registered?
-                       if (!isBooleanConstantAndTrue('admin_registered')) {
+                       if (!isAdminRegistered()) {
                                // Write to config that registration is done
                                changeDataInFile(constant('PATH')."inc/config.php", "ADMIN-SETUP", "define('admin_registered', ", ");", "true", 0);
 
                                // Write to config that registration is done
                                changeDataInFile(constant('PATH')."inc/config.php", "ADMIN-SETUP", "define('admin_registered', ", ");", "true", 0);
 
index 0e50b238a44a1e167707aa64af2bd24bc9cd8bb7..8d98c3d7ea56a6104b2eeae393bafa6e1125d112 100644 (file)
@@ -974,7 +974,7 @@ function ADMIN_DELETE_ENTRIES_CONFIRM ($IDs, $table, $columns=array(), $filterFu
                        $idList = "";
                        foreach ($IDs as $id => $sel) {
                                // Is there a userid?
                        $idList = "";
                        foreach ($IDs as $id => $sel) {
                                // Is there a userid?
-                               if (REQUEST_ISSET_POST(('uid_raw', $id))) {
+                               if (REQUEST_ISSET_POST('uid_raw', $id)) {
                                        // Load all data from that id
                                        $result = SQL_QUERY_ESC("SELECT * FROM `{!_MYSQL_PREFIX!}_%s` WHERE %s=%s LIMIT 1",
                                                array($table, $idColumn, $id), __FILE__, __LINE__);
                                        // Load all data from that id
                                        $result = SQL_QUERY_ESC("SELECT * FROM `{!_MYSQL_PREFIX!}_%s` WHERE %s=%s LIMIT 1",
                                                array($table, $idColumn, $id), __FILE__, __LINE__);
index 14ff7074fe7f46be755e3a2f3f76cdada506f75e..e354d7c9c675c4f32590e7811b4c23da9d5a5649 100644 (file)
@@ -56,10 +56,10 @@ set_error_handler('__errorHandler');
 register_shutdown_function('__SHUTDOWN_HOOK');
 
 // Check if the user setups his MySQL stuff...
 register_shutdown_function('__SHUTDOWN_HOOK');
 
 // Check if the user setups his MySQL stuff...
-if ((empty($MySQL['login'])) && (!defined('mxchange_installing')) && (!REQUEST_ISSET_GET(('installing'))) && (isBooleanConstantAndTrue('mxchange_installed'))) {
+if ((empty($MySQL['login'])) && (!defined('mxchange_installing')) && (!REQUEST_ISSET_GET(('installing'))) && (isInstalled())) {
        // No login entered and outside installation mode
        OUTPUT_HTML("<strong>{--LANG_WARNING--}:</strong> ");
        // No login entered and outside installation mode
        OUTPUT_HTML("<strong>{--LANG_WARNING--}:</strong> ");
-       if (isBooleanConstantAndTrue('mxchange_installed')) {
+       if (isInstalled()) {
                // You have changed my configuration file!
                mxchange_die("{--DIE_CONFIG_CHANGED_YOU--}");
        } else {
                // You have changed my configuration file!
                mxchange_die("{--DIE_CONFIG_CHANGED_YOU--}");
        } else {
@@ -85,7 +85,7 @@ $GLOBALS['header_sent'] = 0;
 initFatalMessages();
 
 // Check if this file is writeable or read-only and warn the user
 initFatalMessages();
 
 // Check if this file is writeable or read-only and warn the user
-if ((!isInstalling()) && (isBooleanConstantAndTrue('mxchange_installed'))) {
+if ((!isInstalling()) && (isInstalled())) {
        // Check for write-permission for config.php and inc directory
        if (empty($GLOBALS['module'])) $GLOBALS['module'] = "index";
 
        // Check for write-permission for config.php and inc directory
        if (empty($GLOBALS['module'])) $GLOBALS['module'] = "index";
 
@@ -219,7 +219,7 @@ if ((!isInstalling()) && (isBooleanConstantAndTrue('mxchange_installed'))) {
        } // END - if
 
        // Double-check installation mode
        } // END - if
 
        // Double-check installation mode
-       if ((!isBooleanConstantAndTrue('mxchange_installed')) || (!isBooleanConstantAndTrue('admin_registered'))) {
+       if ((!isInstalled()) || (!isAdminRegistered())) {
                // Check for file permissions
                if (!IS_INC_WRITEABLE("config")) {
                        addFatalMessage(getMessage('CONFIG_IS_WRITE_PROTECTED'));
                // Check for file permissions
                if (!IS_INC_WRITEABLE("config")) {
                        addFatalMessage(getMessage('CONFIG_IS_WRITE_PROTECTED'));
@@ -233,7 +233,7 @@ if ((!isInstalling()) && (isBooleanConstantAndTrue('mxchange_installed'))) {
        } // END - if
 }
 
        } // END - if
 }
 
-if ((getTotalFatalErrors() > 0) && (isBooleanConstantAndTrue('mxchange_installed')) && (!defined('mxchange_installing')) && ($GLOBALS['output_mode'] != "1")) {
+if ((getTotalFatalErrors() > 0) && (isInstalled()) && (!defined('mxchange_installing')) && ($GLOBALS['output_mode'] != "1")) {
        // One or more fatal error(s) occur during connect...
        LOAD_INC_ONCE("inc/header.php");
        LOAD_INC_ONCE("inc/fatal_errors.php");
        // One or more fatal error(s) occur during connect...
        LOAD_INC_ONCE("inc/header.php");
        LOAD_INC_ONCE("inc/fatal_errors.php");
index 6b244371c278f309b049efa4f6221b62aade5e79..f1a90a82bde87f14eb7279694520284d0d2d515f 100644 (file)
@@ -44,7 +44,7 @@ function ADD_MODULE_TITLE ($mod) {
        $result = false;
 
        // Is the script installed?
        $result = false;
 
        // Is the script installed?
-       if (isBooleanConstantAndTrue('mxchange_installed')) {
+       if (isInstalled()) {
                // Check if cache is valid
                if ((GET_EXT_VERSION("cache") >= "0.1.2") && (isset($GLOBALS['cache_array']['modules']['module'])) && (in_array($mod, $GLOBALS['cache_array']['modules']['module']))) {
                        // Load from cache
                // Check if cache is valid
                if ((GET_EXT_VERSION("cache") >= "0.1.2") && (isset($GLOBALS['cache_array']['modules']['module'])) && (in_array($mod, $GLOBALS['cache_array']['modules']['module']))) {
                        // Load from cache
@@ -100,7 +100,7 @@ function CHECK_MODULE ($mod) {
        $ret = "major";
 
        // Check if script is installed if not return a "done" to prevent some errors
        $ret = "major";
 
        // Check if script is installed if not return a "done" to prevent some errors
-       if ((!isBooleanConstantAndTrue('mxchange_installed')) || (isInstalling()) || (!isBooleanConstantAndTrue('admin_registered'))) {
+       if ((!isInstalled()) || (isInstalling()) || (!isAdminRegistered())) {
                // Not installed or no admin registered or in installation phase
                return "done";
        } // END - if
                // Not installed or no admin registered or in installation phase
                return "done";
        } // END - if
@@ -916,8 +916,12 @@ function GET_ACTION ($MODE, &$wht) {
                // Free memory
                SQL_FREERESULT($result);
        } elseif ((GET_EXT_VERSION("sql_patches") == "") && ($MODE != "admin")) {
                // Free memory
                SQL_FREERESULT($result);
        } elseif ((GET_EXT_VERSION("sql_patches") == "") && ($MODE != "admin")) {
-               // No sql_patches installed!
-               LOAD_URL("admin.php");
+               // No sql_patches installed, but maybe we need to register an admin?
+               if (isAdminRegistered()) {
+                       // Redirect
+                       // @TODO Why does this lead into an endless loop but we still need it???
+                       LOAD_URL("admin.php");
+               } // END - if
        }
 
        // Return action value
        }
 
        // Return action value
index 93e986148ad7a6b01220de3b9790791d1705205e..2b17629be4d08ca9d99aca96b61c6d27ae8d5eed 100644 (file)
@@ -47,7 +47,7 @@ if (defined('__DAILY_RESET')) {
 $GLOBALS['pool_cnt'] = 0;
 
 // Load more cache includes
 $GLOBALS['pool_cnt'] = 0;
 
 // Load more cache includes
-$INC_POOL = GET_DIR_AS_ARRAY(constant('PATH')."inc/pool/", "pool-");
+$INC_POOL = GET_DIR_AS_ARRAY("inc/pool/", "pool-");
 
 // Run the filter
 RUN_FILTER('load_includes', $INC_POOL);
 
 // Run the filter
 RUN_FILTER('load_includes', $INC_POOL);
index 839a2ffe71a3a0269cdc5a87a856f01f9ee81460..b110317396d89a7f79617ae8a9edb9b4fc2acf6e 100644 (file)
@@ -59,8 +59,12 @@ function REQUEST_GET ($element) {
 }
 
 // Checks if an element in $_GET exists
 }
 
 // Checks if an element in $_GET exists
-function REQUEST_ISSET_GET ($element) {
-       return (isset($_GET[$element]));
+function REQUEST_ISSET_GET ($element, $extra="") {
+       if (empty($extra)) {
+               return (isset($_GET[$element]));
+       } else {
+               return (isset($_GET[$element][$extra]));
+       }
 }
 
 // Removes an element from $_GET
 }
 
 // Removes an element from $_GET
@@ -106,8 +110,12 @@ function REQUEST_POST ($element) {
 }
 
 // Checks if an element in $_POST exists
 }
 
 // Checks if an element in $_POST exists
-function REQUEST_ISSET_POST ($element) {
-       return (isset($_POST[$element]));
+function REQUEST_ISSET_POST ($element, $extra="") {
+       if (empty($extra)) {
+               return (isset($_POST[$element]));
+       } else {
+               return (isset($_POST[$element][$extra]));
+       }
 }
 
 // Removes an element from $_POST
 }
 
 // Removes an element from $_POST
index dfbe878f02b3f29cfdc8b147be798b24b45e6012..8a519af59776b3fdddcef77132a2947e30dcd88f 100644 (file)
@@ -43,7 +43,7 @@ $STYLES = array(
 );
 
 // Add stylesheet for installation
 );
 
 // Add stylesheet for installation
-if ((basename($_SERVER['PHP_SELF']) == "install.php") || (!isBooleanConstantAndTrue('mxchange_installed')) || (REQUEST_ISSET_GET(('installing')))) $STYLES[] = "install.css";
+if ((basename($_SERVER['PHP_SELF']) == "install.php") || (!isInstalled()) || (REQUEST_ISSET_GET(('installing')))) $STYLES[] = "install.css";
 
 // When no CSS output-mode is set, set it to file-output
 if (!isConfigEntrySet('css_php')) setConfigEntry('css_php', "FILE");
 
 // When no CSS output-mode is set, set it to file-output
 if (!isConfigEntrySet('css_php')) setConfigEntry('css_php', "FILE");
index 4f2b720262c8a11511b26d458a842dd6c948e512..6a03eee6224f913c5338d196c1da3b91b32c2442 100644 (file)
--- a/index.php
+++ b/index.php
@@ -49,7 +49,7 @@ $GLOBALS['output_mode'] = "0";
 require("inc/config.php");
 
 // Is the script installed?
 require("inc/config.php");
 
 // Is the script installed?
-if (isBooleanConstantAndTrue('mxchange_installed')) {
+if (isInstalled()) {
        // Header
        LOAD_INC("inc/header.php");
 
        // Header
        LOAD_INC("inc/header.php");
 
index 6be0243cbcc56e1a1c36ca0b2cc10f9cf7b23621..238ae1317fd54bd870b7559b3c587048647b93c5 100644 (file)
@@ -69,7 +69,7 @@ if (!REQUEST_ISSET_GET('page')) {
 } // END - if
 
 // Already installed?
 } // END - if
 
 // Already installed?
-if ((isBooleanConstantAndTrue('mxchange_installed')) && (isBooleanConstantAndTrue('admin_registered'))) {
+if ((isInstalled()) && (isAdminRegistered())) {
        // Add fatal message
        addFatalMessage(getMessage('ALREADY_INSTALLED'));
 } // END - if
        // Add fatal message
        addFatalMessage(getMessage('ALREADY_INSTALLED'));
 } // END - if
diff --git a/js.php b/js.php
index ea67c9dd581682c9c4e63e7a04193f013f96cb3c..ec46e60e499120e90d8cf3eda625062b27b1a01f 100644 (file)
--- a/js.php
+++ b/js.php
@@ -55,7 +55,7 @@ $GLOBALS['module'] = "js";
 require("inc/config.php");
 
 // Is this script installed and a JavaScript tag is provied?
 require("inc/config.php");
 
 // Is this script installed and a JavaScript tag is provied?
-if ((isBooleanConstantAndTrue('mxchange_installed')) && (REQUEST_ISSET_GET(('tag')))) {
+if ((isInstalled()) && (REQUEST_ISSET_GET(('tag')))) {
        // Set header
        header("Content-type: text/javascript");
 
        // Set header
        header("Content-type: text/javascript");
 
index 3d51c0bb2e0d17c0c6532b4273deb50f00888bab..1a89ab74d44b0680e34f652fbe8af64033aac9a2 100644 (file)
@@ -49,7 +49,7 @@ $GLOBALS['output_mode'] = "0";
 require("inc/config.php");
 
 // Is the script installed?
 require("inc/config.php");
 
 // Is the script installed?
-if (isBooleanConstantAndTrue('mxchange_installed')) {
+if (isInstalled()) {
        // Header
        LOAD_INC("inc/header.php");
 
        // Header
        LOAD_INC("inc/header.php");
 
index 231f9cdf278fcd1b1110134dcd30c0ada3ef41a3..5de0aee7769a3ed5d527549664102e788b4550cc 100644 (file)
--- a/login.php
+++ b/login.php
@@ -48,7 +48,7 @@ $GLOBALS['output_mode'] = "0";
 require("inc/config.php");
 
 // Is the script installed?
 require("inc/config.php");
 
 // Is the script installed?
-if (isBooleanConstantAndTrue('mxchange_installed')) {
+if (isInstalled()) {
        // Is this a member?
        if (IS_MEMBER()) {
                // Then redirect into login area
        // Is this a member?
        if (IS_MEMBER()) {
                // Then redirect into login area
index 2133bd192274c40de440fa3c17cce67c6d170c4b..0823734e6f2cc1ce85e1e9c996e5d2838db0c7a4 100644 (file)
@@ -45,7 +45,7 @@ $GLOBALS['output_mode'] = -1;
 // Load the required file(s)
 require("inc/config.php");
 
 // Load the required file(s)
 require("inc/config.php");
 
-if (isBooleanConstantAndTrue('mxchange_installed')) {
+if (isInstalled()) {
        // Is the extension active?
        REDIRECT_ON_UNINSTALLED_EXTENSION("mailid");
 
        // Is the extension active?
        REDIRECT_ON_UNINSTALLED_EXTENSION("mailid");
 
index 6af37a64d2868d90be4b007d5f8ccee7a475e057..7e63705eaaf9c70ef6a08ea63075c5fcecc8b25e 100644 (file)
@@ -45,7 +45,7 @@ $GLOBALS['output_mode'] = 0;
 // Load the required file(s)
 require("inc/config.php");
 
 // Load the required file(s)
 require("inc/config.php");
 
-if (isBooleanConstantAndTrue('mxchange_installed')) {
+if (isInstalled()) {
        // Is the extension active
        if (!EXT_IS_ACTIVE("mailid", true)) {
                // Is not activated/installed yet!
        // Is the extension active
        if (!EXT_IS_ACTIVE("mailid", true)) {
                // Is not activated/installed yet!
diff --git a/ref.php b/ref.php
index 35b1e175feb92d6f829c4795330737e8a002707e..c26ce8bfde155334eabeb6ad31918cb9b0cad3be 100644 (file)
--- a/ref.php
+++ b/ref.php
@@ -46,7 +46,7 @@ $GLOBALS['output_mode'] = -1;
 require("inc/config.php");
 
 // Redirect only to registration page when this script is installed
 require("inc/config.php");
 
 // Redirect only to registration page when this script is installed
-if (isBooleanConstantAndTrue('mxchange_installed')) {
+if (isInstalled()) {
        // Base URL for redirection
        switch (getConfig('refid_target'))
        {
        // Base URL for redirection
        switch (getConfig('refid_target'))
        {
index 5773cf1b7de7f05cee4e5cd6fb904d93ec65a81c..db429a70247b7421e03f522d2eb627c862710eec 100644 (file)
@@ -50,7 +50,7 @@ require("inc/config.php");
 REDIRECT_ON_UNINSTALLED_EXTENSION("bonus");
 
 // List only rankings when script is installed
 REDIRECT_ON_UNINSTALLED_EXTENSION("bonus");
 
 // List only rankings when script is installed
-if (isBooleanConstantAndTrue('mxchange_installed')) {
+if (isInstalled()) {
        // Include header
        LOAD_INC("inc/header.php");
 
        // Include header
        LOAD_INC("inc/header.php");
 
index a479aaaa52e32c1c08f3f487e92ad3925092f058..9d54361107ecda48ccf12baddc78dc40144978e0 100644 (file)
@@ -47,7 +47,7 @@ $GLOBALS['output_mode'] = "0";
 require("inc/config.php");
 
 // Is the script installed?
 require("inc/config.php");
 
 // Is the script installed?
-if (isBooleanConstantAndTrue('mxchange_installed')) {
+if (isInstalled()) {
        // Base URL for redirection
        $URL = "modules.php?module=index&amp;what=sponsor_login&amp;hash=";
        if (!REQUEST_ISSET_GET(('hash'))) {
        // Base URL for redirection
        $URL = "modules.php?module=index&amp;what=sponsor_login&amp;hash=";
        if (!REQUEST_ISSET_GET(('hash'))) {
index 0b3345e3cecfa0138b9baec61c2cb90e49bfa8de..9e909bd3f209b25503584f0406a3fb3d73f8e678 100644 (file)
@@ -46,7 +46,7 @@ $GLOBALS['output_mode'] = "0";
 require("inc/config.php");
 
 // Redirect only to registration page when this script is installed
 require("inc/config.php");
 
 // Redirect only to registration page when this script is installed
-if (isBooleanConstantAndTrue('mxchange_installed')) {
+if (isInstalled()) {
        // Base URL for redirection
        $URL = "modules.php?module=index&amp;what=sponsor_reg&amp;refid=";
 
        // Base URL for redirection
        $URL = "modules.php?module=index&amp;what=sponsor_reg&amp;refid=";
 
index 01ddd7e57ac7de9a95560f288dfd63f636b26ce9..3e10594f6744bac813a03fd4baeff59f6f8716ab 100644 (file)
@@ -50,7 +50,7 @@ $msg = null;
 require("inc/config.php");
 
 // Is the script installed?
 require("inc/config.php");
 
 // Is the script installed?
-if (isBooleanConstantAndTrue('mxchange_installed')) {
+if (isInstalled()) {
        // Only logged in users may use this surfbar!
        REDIRECT_ON_UNINSTALLED_EXTENSION("surfbar");
 
        // Only logged in users may use this surfbar!
        REDIRECT_ON_UNINSTALLED_EXTENSION("surfbar");