]> git.mxchange.org Git - mailer.git/commitdiff
is now located in ['config']
authorRoland Häder <roland@mxchange.org>
Tue, 28 Jul 2009 19:17:43 +0000 (19:17 +0000)
committerRoland Häder <roland@mxchange.org>
Tue, 28 Jul 2009 19:17:43 +0000 (19:17 +0000)
DOCS/TODOs.txt
inc/autopurge/purge-
inc/config-functions.php
inc/functions.php

index f76e6c0e9bb3494df98035addc80d05d007f6568..a31fbd24ecc42f0cb4e6cce70d22bdc2c08e00ba 100644 (file)
@@ -3,8 +3,8 @@
 ./beg.php:195:                 // @TODO Opps, what is missing here???
 ./doubler.php:269:// @TODO Rewrite all constants
 ./inc/cache/config-local.php:120:// @TODO Rewrite the following three constants, somehow...
 ./beg.php:195:                 // @TODO Opps, what is missing here???
 ./doubler.php:269:// @TODO Rewrite all constants
 ./inc/cache/config-local.php:120:// @TODO Rewrite the following three constants, somehow...
-./inc/config-functions.php:182:        // @TODO Make this all better... :-/
-./inc/config-functions.php:207:        // @TODO Rewrite these all to config entries, if somehow possible
+./inc/config-functions.php:168:        // @TODO Make this all better... :-/
+./inc/config-functions.php:193:        // @TODO Rewrite these all to config entries, if somehow possible
 ./inc/config-global.php:60:// @TODO These constants should be rewritten
 ./inc/extensions/ext-sql_patches.php:705:                                              // @TODO Rewrite this to a filter!
 ./inc/extensions/ext-sql_patches.php:743:                                      // @TODO Can we remove this? setConfigEntry('verbose_sql'        , 'N');
 ./inc/config-global.php:60:// @TODO These constants should be rewritten
 ./inc/extensions/ext-sql_patches.php:705:                                              // @TODO Rewrite this to a filter!
 ./inc/extensions/ext-sql_patches.php:743:                                      // @TODO Can we remove this? setConfigEntry('verbose_sql'        , 'N');
 ./inc/extensions/ext-surfbar.php:237:                          // @TODO Set some constants we need???
 ./inc/extensions.php:355:// @TODO Change from ext_id to ext_name (not just even the variable! ;-) )
 ./inc/extensions.php:431:              // @TODO Extension is loaded, what next?
 ./inc/extensions/ext-surfbar.php:237:                          // @TODO Set some constants we need???
 ./inc/extensions.php:355:// @TODO Change from ext_id to ext_name (not just even the variable! ;-) )
 ./inc/extensions.php:431:              // @TODO Extension is loaded, what next?
-./inc/functions.php:1224:      // @TODO Rewrite this unnice code
-./inc/functions.php:1285:      // @TODO Remove this if() block if all is working fine
-./inc/functions.php:1585:              // @TODO This can be, somehow, rewritten
+./inc/functions.php:1227:      // @TODO Rewrite this unnice code
+./inc/functions.php:1288:      // @TODO Remove this if() block if all is working fine
+./inc/functions.php:1588:              // @TODO This can be, somehow, rewritten
 ./inc/functions.php:211:       // @TODO Remove this sanity-check if all is fine
 ./inc/functions.php:211:       // @TODO Remove this sanity-check if all is fine
-./inc/functions.php:2389:      // @TODO The status should never be empty
-./inc/functions.php:2465:                      $GLOBALS['cache_instance']->destroyCacheFile(); // @TODO isn't it better to do $GLOBALS['cache_instance']->destroyCacheFile('revision')?
-./inc/functions.php:2467:                      // @TODO shouldn't do the unset and the reloading $GLOBALS['cache_instance']->destroyCacheFile() Or a new methode like forceCacheReload('revision')?
+./inc/functions.php:2392:      // @TODO The status should never be empty
+./inc/functions.php:2468:                      $GLOBALS['cache_instance']->destroyCacheFile(); // @TODO isn't it better to do $GLOBALS['cache_instance']->destroyCacheFile('revision')?
+./inc/functions.php:2470:                      // @TODO shouldn't do the unset and the reloading $GLOBALS['cache_instance']->destroyCacheFile() Or a new methode like forceCacheReload('revision')?
 ./inc/functions.php:250:                       // @TODO Fine all templates which are using these direct variables and rewrite them.
 ./inc/functions.php:251:                       // @TODO After this step is done, this else-block is history
 ./inc/functions.php:250:                       // @TODO Fine all templates which are using these direct variables and rewrite them.
 ./inc/functions.php:251:                       // @TODO After this step is done, this else-block is history
-./inc/functions.php:2528:// @TODO Please describe this function
-./inc/functions.php:2540:      searchDirsRecursive($next_dir, $last_changed); // @TODO small change to API to $last_changed = searchDirsRecursive($next_dir, $time);
-./inc/functions.php:2623:              // @TODO Add a little more infos here
-./inc/functions.php:2634:      // @TODO This cannot be rewritten to app_die(), try to find a solution for this.
-./inc/functions.php:2791:                      // @TODO Are these convertions still required?
-./inc/functions.php:2809:// @TODO Rewrite this function to use readFromFile() and writeToFile()
+./inc/functions.php:2531:// @TODO Please describe this function
+./inc/functions.php:2543:      searchDirsRecursive($next_dir, $last_changed); // @TODO small change to API to $last_changed = searchDirsRecursive($next_dir, $time);
+./inc/functions.php:2626:              // @TODO Add a little more infos here
+./inc/functions.php:2637:      // @TODO This cannot be rewritten to app_die(), try to find a solution for this.
+./inc/functions.php:2794:                      // @TODO Are these convertions still required?
+./inc/functions.php:2812:// @TODO Rewrite this function to use readFromFile() and writeToFile()
 ./inc/functions.php:466:// @TODO Rewrite this to an extension 'smtp'
 ./inc/install-inc.php:20: * @TODO Rewrite all constants in this include file                     *
 ./inc/language/de.php:1159:// @TODO Rewrite these two constants
 ./inc/functions.php:466:// @TODO Rewrite this to an extension 'smtp'
 ./inc/install-inc.php:20: * @TODO Rewrite all constants in this include file                     *
 ./inc/language/de.php:1159:// @TODO Rewrite these two constants
index b0c5c7e5d890fa71a7501b3eeb22637673ad27e8..85bf8951a918532669bf38ee6136e65c646c3eb0 100644 (file)
@@ -43,7 +43,7 @@ if (!defined('__SECURITY')) {
 } // END - if
 
 // Abort if autopurge is not active or disabled by admin
 } // END - if
 
 // Abort if autopurge is not active or disabled by admin
-if ((!EXT_IS_ACTIVE("autopurge")) || ($_CONFIG['auto_purge_active'] == "N")) {
+if ((!EXT_IS_ACTIVE('autopurge')) || (getConfig('auto_purge_active') == 'N')) {
        // Abort here
        return false;
 } // END - if
        // Abort here
        return false;
 } // END - if
index c15828ad8f04eef15f1ed6c699eec2030c3e937e..531ad1884429a374e92c99a60658ac763e6e475f 100644 (file)
@@ -42,33 +42,28 @@ if (!defined('__SECURITY')) {
        require($INC);
 }
 
        require($INC);
 }
 
-// Merges $_CONFIG with data in given array
+// Merges $GLOBALS['config'] with data in given array
 function mergeConfig ($newConfig) {
 function mergeConfig ($newConfig) {
-       global $_CONFIG;
-       $_CONFIG = merge_array(getConfigArray(), $newConfig);
+       $GLOBALS['config'] = merge_array(getConfigArray(), $newConfig);
 }
 
 }
 
-// Getter for $_CONFIG entries
+// Getter for $GLOBALS['config'] entries
 function getConfig ($configEntry) {
 function getConfig ($configEntry) {
-       global $_CONFIG;
-
        // Default value
        $value = null;
 
        // Is the entry there?
        if (isConfigEntrySet($configEntry)) {
                // Then use it
        // Default value
        $value = null;
 
        // Is the entry there?
        if (isConfigEntrySet($configEntry)) {
                // Then use it
-               $value = $_CONFIG[$configEntry];
+               $value = $GLOBALS['config'][$configEntry];
        } // END - if
 
        // Return it
        return $value;
 }
 
        } // END - if
 
        // Return it
        return $value;
 }
 
-// Setter for $_CONFIG entries
+// Setter for $GLOBALS['config'] entries
 function setConfigEntry ($configEntry, $value) {
 function setConfigEntry ($configEntry, $value) {
-       global $_CONFIG;
-
        // Secure the entry name
        if (function_exists('SQL_ESCAPE')) {
                // Use our secure function
        // Secure the entry name
        if (function_exists('SQL_ESCAPE')) {
                // Use our secure function
@@ -85,41 +80,34 @@ function setConfigEntry ($configEntry, $value) {
        } // END - if
 
        // And set it
        } // END - if
 
        // And set it
-       $_CONFIG[$configEntry] = $value;
+       $GLOBALS['config'][$configEntry] = $value;
 }
 
 // Checks wether the given config entry is set
 function isConfigEntrySet ($configEntry) {
 }
 
 // Checks wether the given config entry is set
 function isConfigEntrySet ($configEntry) {
-       global $_CONFIG;
-       return (isset($_CONFIG[$configEntry]));
+       return (isset($GLOBALS['config'][$configEntry]));
 }
 
 // Increment or init with given value or 1 as default the given config entry
 function incrementConfigEntry ($configEntry, $value=1) {
 }
 
 // Increment or init with given value or 1 as default the given config entry
 function incrementConfigEntry ($configEntry, $value=1) {
-       global $_CONFIG;
-
        // Increment it if set or init it with 1
        if (getConfig($configEntry) > 0) {
        // Increment it if set or init it with 1
        if (getConfig($configEntry) > 0) {
-               $_CONFIG[$configEntry] += $value;
+               $GLOBALS['config'][$configEntry] += $value;
        } else {
        } else {
-               $_CONFIG[$configEntry] = $value;
+               $GLOBALS['config'][$configEntry] = $value;
        }
 }
 
 // Checks wether the configuration array is set so the config is loaded
 function isConfigLoaded () {
        }
 }
 
 // Checks wether the configuration array is set so the config is loaded
 function isConfigLoaded () {
-       global $_CONFIG;
-
        // Check all
        // Check all
-       return ((isset($_CONFIG)) && (is_array($_CONFIG)) && (count($_CONFIG) > 0));
+       return ((isset($GLOBALS['config'])) && (is_array($GLOBALS['config'])) && (count($GLOBALS['config']) > 0));
 }
 
 // Init the config array
 function initConfig () {
 }
 
 // Init the config array
 function initConfig () {
-       global $_CONFIG;
-
        // Set a minimum dummy configuration
        // Set a minimum dummy configuration
-       $_CONFIG = array(
+       $GLOBALS['config'] = array(
                'code_length' => 0,
                'patch_level' => 0,
                'last_update' => time()
                'code_length' => 0,
                'patch_level' => 0,
                'last_update' => time()
@@ -159,17 +147,15 @@ function loadConfiguration ($no = '0') {
        }
 }
 
        }
 }
 
-// Getter for whole $_CONFIG array
+// Getter for whole $GLOBALS['config'] array
 function getConfigArray () {
 function getConfigArray () {
-       global $_CONFIG;
-
        // Default is null
        $return = null;
 
        // Is the config set?
        if (isConfigLoaded()) {
                // Then use it
        // Default is null
        $return = null;
 
        // Is the config set?
        if (isConfigLoaded()) {
                // Then use it
-               $return = $_CONFIG;
+               $return = $GLOBALS['config'];
        } // END - if
 
        // Return result
        } // END - if
 
        // Return result
index 16a7194b80aedc83954c4b70732b2e423fda8573..78bd0a85409b62f7ff3237993f4a7eeebe421db2 100644 (file)
@@ -735,7 +735,10 @@ function generateCaptchaCode ($code, $type, $DATA, $uid) {
 
 // Loads an email template and compiles it
 function LOAD_EMAIL_TEMPLATE ($template, $content = array(), $UID = '0') {
 
 // Loads an email template and compiles it
 function LOAD_EMAIL_TEMPLATE ($template, $content = array(), $UID = '0') {
-       global $DATA, $_CONFIG;
+       global $DATA;
+
+       // Our configuration is kept non-global here
+       $_CONFIG = getConfigArray();
 
        // Make sure all template names are lowercase!
        $template = strtolower($template);
 
        // Make sure all template names are lowercase!
        $template = strtolower($template);