Fixes/rewrites for 'dublicate entry' bug
authorRoland Häder <roland@mxchange.org>
Wed, 4 Mar 2009 18:15:58 +0000 (18:15 +0000)
committerRoland Häder <roland@mxchange.org>
Wed, 4 Mar 2009 18:15:58 +0000 (18:15 +0000)
36 files changed:
inc/autopurge.php
inc/autopurge/purge-inact.php
inc/autopurge/purge-mails.php
inc/autopurge/purge-tsks.php
inc/autopurge/purge-unconfirmed.php
inc/databases.php
inc/db/lib-mysql3.php
inc/doubler_send.php
inc/extensions.php
inc/extensions/ext-cache.php
inc/extensions/ext-sql_patches.php
inc/functions.php
inc/libs/cache_functions.php
inc/libs/surfbar_functions.php
inc/libs/wernis_functions.php
inc/libs/yoomedia_functions.php
inc/load_cache.php
inc/load_extensions.php
inc/loader/load_cache-admin.php
inc/loader/load_cache-config.php
inc/loader/load_cache-modreg.php
inc/loader/load_cache-refdepths.php
inc/loader/load_cache-refsystem.php
inc/loader/load_cache-them.php
inc/modules/admin/admin-inc.php
inc/modules/admin/what-config_primera.php
inc/modules/admin/what-config_refback.php
inc/modules/admin/what-config_transfer.php
inc/modules/admin/what-config_wernis.php
inc/modules/admin/what-config_yoomedia.php
inc/modules/admin/what-updates.php
inc/modules/member/what-primera.php
inc/modules/member/what-wernis.php
inc/monthly/monthly_beg.php
inc/monthly/monthly_bonus.php
inc/pool-update.php

index 72b242a0b41048526634c85707077ce35a92d8fc..aec79e6cc367c3a16795584aed808e6bb4f3e6df 100644 (file)
@@ -37,11 +37,8 @@ if (!defined('__SECURITY')) {
        require($INC);
 } // END - if
 
-// Load all includes
-$INC_POOL = GET_DIR_AS_ARRAY("inc/autopurge/", "purge-");
-
 // Run the filter
-runFilterChain('load_includes', $INC_POOL);
+runFilterChain('load_includes', GET_DIR_AS_ARRAY("inc/autopurge/", "purge-"));
 
 // Run filters for extra autopurge
 runFilterChain('extra_autopurge');
index c015fc56da5270b421f1c53874267cd7efc18008..adb04be8cbf74b102b892ff2ab242b8a2a48bd84 100644 (file)
@@ -46,7 +46,7 @@ if ((!EXT_IS_ACTIVE("autopurge")) || (getConfig('auto_purge_active') != "Y")) {
 // Shall I look for inactive accounts and autopurge inactive accounts?
 if (getConfig('autopurge_inactive') == "Y") {
        // Ok, let's have a look...
-       $since = bigintval(getConfig('ap_inactive_since'));
+       $since = getConfig(('ap_inactive_since'));
 
        // Init exclusion list
        $EXCLUDE_LIST = "";
@@ -107,7 +107,7 @@ ORDER BY d.userid", array($since, $since, $since), __FILE__, __LINE__);
 
        // Now let's have a look for inactive accounts we want to delete we newly use the same exclude list
        // here for e.g. excluding holiday users
-       $time = bigintval(getConfig('ap_in_time'));
+       $time = getConfig(('ap_in_time'));
        $result_inactive = SQL_QUERY_ESC("SELECT d.userid, d.email, d.last_online
 FROM `{!_MYSQL_PREFIX!}_user_data` AS d
 WHERE `status`='CONFIRMED' AND joined < (UNIX_TIMESTAMP() - %s) AND last_online < (UNIX_TIMESTAMP() - %s) AND ap_notified < (UNIX_TIMESTAMP() - %s)
index 7d5de277833197ad8e314faefe9cc544925a7799..3970e29008f94b49dac5902c8ae61eb85c04ee82 100644 (file)
@@ -46,7 +46,7 @@ if ((!EXT_IS_ACTIVE("autopurge")) || (getConfig('auto_purge_active') != "Y")) {
 // Search for mails from deleted members?
 if (getConfig('ap_del_mails') == "Y") {
        // Okay, let's check for them...
-       $since = bigintval(getConfig('ap_dm_timeout'));
+       $since = getConfig(('ap_dm_timeout'));
        $result_mails = SQL_QUERY_ESC("SELECT sender\
 FROM `{!_MYSQL_PREFIX!}_pool`
 WHERE data_type='DELETED' AND timestamp <= (UNIX_TIMESTAMP() - %s)
@@ -70,7 +70,7 @@ ORDER BY sender ASC",
                                $DELETED += SQL_AFFECTEDROWS();
 
                                // Reset query (to prevent possible errors) ...
-                               $since = bigintval(getConfig('ap_dm_timeout'));
+                               $since = getConfig(('ap_dm_timeout'));
                                $result_mails = SQL_QUERY_ESC("SELECT sender
 FROM `{!_MYSQL_PREFIX!}_pool`
 WHERE data_type='DELETED' AND timestamp <= (UNIX_TIMESTAMP() - %s)
@@ -84,7 +84,7 @@ ORDER BY sender ASC",
        SQL_FREERESULT($result_mails);
 
        // Now let's check for stats entries as well
-       $since = bigintval(getConfig('ap_dm_timeout'));
+       $since = getConfig(('ap_dm_timeout'));
        $result_mails = SQL_QUERY_ESC("SELECT sender
 FROM `{!_MYSQL_PREFIX!}_user_stats`
 WHERE data_type='DELETED' AND timestamp_send <= (UNIX_TIMESTAMP() - %s)
@@ -103,7 +103,7 @@ ORDER BY sender ASC",
                                $DELETED += SQL_AFFECTEDROWS();
 
                                // Reset query (to prevent possible errors) ...
-                               $since = bigintval(getConfig('ap_dm_timeout'));
+                               $since = getConfig(('ap_dm_timeout'));
                                $result_mails = SQL_QUERY_ESC("SELECT sender
 FROM `{!_MYSQL_PREFIX!}_user_stats`
 WHERE data_type='DELETED' AND timestamp_send <= (UNIX_TIMESTAMP() - %s)
index dde1e7c77e30583e22c9dbfd7ac427632ebe44f6..5cdc442315db6cb95759ff3b23fb9cd505eb92c8 100644 (file)
@@ -46,7 +46,7 @@ if ((!EXT_IS_ACTIVE("autopurge")) || (getConfig('auto_purge_active') != "Y")) {
 // Check version (must be > 0.0)
 if ((GET_EXT_VERSION("task") > "0.0") && (getConfig('ap_tasks') == "Y")) {
        // Since when shall we purge?
-       $since = bigintval(getConfig('ap_tasks_time'));
+       $since = getConfig(('ap_tasks_time'));
 
        // Purge deleted tasks (no notification to admin)
        SQL_QUERY_ESC("DELETE LOW_PRIORITY
index baa56db400d3bcd501627431b93a8317386ca4b3..8871ffdbda85ffe9d4a2334fc3ef61533f23aab3 100644 (file)
@@ -46,7 +46,7 @@ if ((!EXT_IS_ACTIVE("autopurge")) || (getConfig('auto_purge_active') != "Y")) {
 // Shall I auto-purge unconfirmed accounts?
 if (getConfig('autopurge_unconfirmed') == "Y") {
        // Init variables and find unconfirmed accounts which I shall auto-purge
-       $time = bigintval(getConfig('ap_un_time'));
+       $time = getConfig(('ap_un_time'));
        $result_uncon = SQL_QUERY_ESC("SELECT userid, email, joined
 FROM `{!_MYSQL_PREFIX!}_user_data`
 WHERE `status`='UNCONFIRMED' AND joined < (UNIX_TIMESTAMP() - %s)
index 530625402fe99e0fca75bae8580dc4fb94fa85cd..de16a5b1b88d0bc24528716dd2ac33ba7b6fb5f5 100644 (file)
@@ -98,7 +98,7 @@ define('SERVER_URL', "http://www.mxchange.org");
 
 // Current SVN revision
 //define('CURR_SVN_REVISION', getActualVersion(0));
-define('CURR_SVN_REVISION', "817");
+define('CURR_SVN_REVISION', "818");
 define('CURR_SVN_DATE'    , getActualVersion(1));
 define('CURR_SVN_VERSION' , getActualVersion(2));
 
index 88a135789b280c4e573327eebd2eb26aa71c5428..b32507823876eb3fbfc042c2857fc65e6e1a18dc 100644 (file)
@@ -203,12 +203,12 @@ function SQL_CLOSE ($F, $L) {
 
        // Do we need to update cache/db counter?
        //* DEBUG: */ echo "DB=".getConfig('db_hits').",CACHE=".getConfig('cache_hits')."<br />\n";
-       if ((GET_EXT_VERSION("cache") >= "0.0.7") && (getConfig('db_hits') > 0) && (getConfig('cache_hits') > 0) && (is_object($GLOBALS['cache_instance']))) {
+       if ((GET_EXT_VERSION("cache") >= "0.0.7") && (getConfig('db_hits') > 0) && (getConfig('cache_hits') > 0) && (isCacheInstanceValid())) {
                // Add new hits
                incrementConfigEntry('db_hits', getConfig('db_hits_run'));
 
                // Update counter for db/cache
-               UPDATE_CONFIG(array("db_hits", "cache_hits"), array(bigintval(getConfig('db_hits')), bigintval(getConfig('cache_hits'))));
+               UPDATE_CONFIG(array("db_hits", "cache_hits"), array(getConfig(('db_hits')), getConfig(('cache_hits'))));
        } // END - if
 
        // Close database link and forget the link
index fe1f0262181d06a97a4d87cb8bb602ea0ead0824..d71492ded8cc6a9d363473d7f42b08466ff30734 100644 (file)
@@ -54,7 +54,7 @@ set_session('DOUBLER_UID', "");
 if (empty($DOUBLER_UID)) $DOUBLER_UID = 0;
 
 // Check for doubles which we can pay out
-$min = bigintval(getConfig('doubler_min') * 2);
+$min = getConfig(('doubler_min') * 2);
 $result_total = SQL_QUERY_ESC("SELECT DISTINCT d.id, d.userid, d.points, d.remote_ip, d.timemark
 FROM `{!_MYSQL_PREFIX!}_doubler` AS d
 LEFT JOIN `{!_MYSQL_PREFIX!}_user_data` AS u
index 9a17fa15c7725804676dc7d0ae447aa3aaadddea..ab96062777e4f643825b7220644f893515452488 100644 (file)
@@ -383,7 +383,7 @@ function GET_EXT_VERSION ($ext_name) {
 
                // Count cache hits
                incrementConfigEntry('cache_hits');
-       } elseif ((!isset($GLOBALS['cache_instance'])) || (!is_object($GLOBALS['cache_instance']))) {
+       } elseif (!isCacheInstanceValid()) {
                // Load from database
                $result = SQL_QUERY_ESC("SELECT ext_version FROM `{!_MYSQL_PREFIX!}_extensions` WHERE ext_name='%s' LIMIT 1",
                        array($ext_name), __FILE__, __LINE__);
index 1ce2684b8ac372dd831ba9558887aa07afe63e96..a1ecd0f022b75e0e109746eaccec9318df9cccdc 100644 (file)
@@ -242,10 +242,10 @@ default: // Do stuff when extension is loaded
        // Create instance on class
        if ($GLOBALS['cacheMode'] != "init") {
                // Initialize cache system only when it's needed
-               $GLOBALS['cache_instance'] = new CacheSystem(getConfig('cache_update'), constant('PATH')."inc/".getConfig('cache_path'), getConfig('cache_tested'));
+               $GLOBALS['cache_instance'] = new CacheSystem(getConfig('cache_update'), "inc/".getConfig('cache_path'), getConfig('cache_tested'));
                if ($GLOBALS['cache_instance']->getStatus() != "done") {
                        // Failed to initialize cache sustem
-                       addFatalMessage(__FILE__, __LINE__, "(<font color=\"#0000aa\">".__LINE__."</font>): ".CACHE_CANNOT_INITIALIZE);
+                       addFatalMessage(__FILE__, __LINE__, "(<font color=\"#0000aa\">".__LINE__."</font>): ".getMessage('CACHE_CANNOT_INITIALIZE'));
                } // END - if
        } // END - if
        break;
index b6e9fb8665b0ffc15db2f2729119eda2c0e1d7bd..c7aef22402711a9ab62d2cd5f127b5810effb160 100644 (file)
@@ -741,7 +741,7 @@ default: // Do stuff when extension is loaded
                        LOAD_INC_ONCE("inc/gen_sql_patches.php");
 
                        // @TODO Rewrite this to a filter!
-                       if ((GET_EXT_VERSION("cache") >= "0.1.2") && (isset($GLOBALS['cache_instance'])) && (is_object($GLOBALS['cache_instance']))) {
+                       if ((GET_EXT_VERSION("cache") >= "0.1.2") && (isCacheInstanceValid())) {
                                // Remove extensions and mod_reg cache file
                                LOAD_INC_ONCE("inc/libs/cache_functions.php");
                                require(sprintf("%sinc/extensions/ext-cache.php", constant('PATH')));
index bfead5a33ee9ba7c8b810a35e540848429ad0318..da1848b706f021c733159beee1c36cf3c07fb330 100644 (file)
@@ -1254,7 +1254,7 @@ function generateRandomCodde ($length, $code, $uid, $DATA="") {
        $keys   = constant('SITE_KEY').":".constant('DATE_KEY');
        if (isConfigEntrySet('secret_key'))  $keys .= ":".getConfig('secret_key');
        if (isConfigEntrySet('file_hash'))   $keys .= ":".getConfig('file_hash');
-       $keys .= ":".date("d-m-Y (l-F-T)", bigintval(getConfig('patch_ctime')));
+       $keys .= ":".date("d-m-Y (l-F-T)", getConfig(('patch_ctime')));
        if (isConfigEntrySet('master_salt')) $keys .= ":".getConfig('master_salt');
 
        // Build string from misc data
@@ -2063,7 +2063,7 @@ function generateHash ($plainText, $salt = "") {
                $server = $_SERVER['PHP_SELF'].":".GET_USER_AGENT().":".getenv('SERVER_SOFTWARE').":".GET_REMOTE_ADDR().":".":".filemtime(constant('PATH')."inc/databases.php");
 
                // Build key string
-               $keys   = constant('SITE_KEY').":".constant('DATE_KEY').":".getConfig('secret_key').":".getConfig('file_hash').":".date("d-m-Y (l-F-T)", bigintval(getConfig('patch_ctime'))).":".getConfig('master_salt');
+               $keys   = constant('SITE_KEY').":".constant('DATE_KEY').":".getConfig('secret_key').":".getConfig('file_hash').":".date("d-m-Y (l-F-T)", getConfig(('patch_ctime'))).":".getConfig('master_salt');
 
                // Additional data
                $data = $plainText.":".uniqid(mt_rand(), true).":".time();
@@ -2580,7 +2580,7 @@ function LOAD_INC ($INC) {
        // Is the include file there?
        if (!FILE_READABLE($FQFN)) {
                // Not there so log it
-               DEBUG_LOG(__FUNCTION__, __LINE__, sprintf("Include file %s not found.", basename($INC)));
+               debug_report_bug(sprintf("Include file %s not found.", $INC));
                return false;
        } // END - if
 
@@ -3182,7 +3182,7 @@ function HANDLE_LOGIN_FAILTURES ($accessLevel) {
 // Rebuild cache
 function rebuildCacheFiles ($cache, $inc="") {
        // Shall I remove the cache file?
-       if ((EXT_IS_ACTIVE("cache")) && (is_object($GLOBALS['cache_instance']))) {
+       if ((EXT_IS_ACTIVE("cache")) && (isCacheInstanceValid())) {
                // Rebuild cache
                if ($GLOBALS['cache_instance']->loadCacheFile($cache)) {
                        // Destroy it
@@ -3213,7 +3213,7 @@ function CACHE_PURGE_ADMIN_MENU ($id=0, $action="", $what="", $str="") {
        if (!EXT_IS_ACTIVE("cache")) {
                // Cache extension not active
                return false;
-       } elseif (!is_object($GLOBALS['cache_instance'])) {
+       } elseif (!isCacheInstanceValid()) {
                // No cache instance!
                DEBUG_LOG(__FUNCTION__, __LINE__, " No cache instance found.");
                return false;
@@ -3361,7 +3361,7 @@ function DETERMINE_REFID () {
                $GLOBALS['refid'] = bigintval(get_session('refid'));
        } elseif ((GET_EXT_VERSION("sql_patches") != "") && (getConfig('def_refid') > 0)) {
                // Set default refid as refid in URL
-               $GLOBALS['refid'] = bigintval(getConfig('def_refid'));
+               $GLOBALS['refid'] = getConfig(('def_refid'));
        } elseif ((GET_EXT_VERSION("user") >= "0.3.4") && (getConfig('select_user_zero_refid')) == "Y") {
                // Select a random user which has confirmed enougth mails
                $GLOBALS['refid'] = SELECT_RANDOM_REFID();
@@ -3417,6 +3417,11 @@ function isDebugModeEnabled () {
        return isBooleanConstantAndTrue('DEBUG_MODE');
 }
 
+// Checks wether the cache instance is valid
+function isCacheInstanceValid () {
+       return ((isset($GLOBALS['cache_instance'])) && (is_object($GLOBALS['cache_instance'])));
+}
+
 //////////////////////////////////////////////////
 // AUTOMATICALLY RE-GENERATED MISSING FUNCTIONS //
 //////////////////////////////////////////////////
index 81a695e9cd5a20314562c20f069becaa9d2745e7..bc24b68aaec6f30ac425e79bd8679c6ee701de95 100644 (file)
@@ -43,6 +43,7 @@ class CacheSystem {
        var $ret = "init";
        var $path = "";
        var $inc = "";
+       var $fqfn = "";
        var $pointer = false;
        var $data = array();
        var $version = array();
@@ -88,22 +89,26 @@ class CacheSystem {
                // Remember cache file
                $this->name = $cacheName;
 
-               // Construct FQFN (full qualified file name)
+               // COnstruct include filename for LOAD_INC_ONCE() call
                $this->inc = $this->path . $cacheName . ".cache";
 
+               // Construct FQFN (full qualified file name)
+               $this->fqfn = constant('PATH') . $this->inc;
+
                // Check if file exists and if version matches
-               $status = (FILE_READABLE($this->inc) && (is_writeable($this->inc)) && ($this->extensionVersionMatches("cache")));
+               $status = ($this->isCacheReadable() && (is_writeable($this->fqfn)) && ($this->extensionVersionMatches("cache")));
 
                // Return status
                return $status;
        }
 
+       // Initializes the cache file
        function init () {
                // This will destory an existing cache file!
                if ($this->ret == "done") {
                        // Create file
-                       if (FILE_READABLE($this->inc)) chmod($this->inc, 0666);
-                       $this->pointer = fopen($this->inc, 'w') or mxchange_die("Cannot write to cache ".$this->inc." !");
+                       if ($this->isCacheReadable()) chmod($this->fqfn, 0666);
+                       $this->pointer = fopen($this->fqfn, 'w') or mxchange_die("Cannot write to cache ".$this->fqfn." !");
 
                        // Add open PHP tag
                        fwrite($this->pointer, "<?php\n");
@@ -112,7 +117,7 @@ class CacheSystem {
                        $this->storeExtensionVersion("cache");
                } else {
                        // Cannot create file
-                       addFatalMessage(__METHOD__, __LINE__, "(<font color=\"#0000aa\">".__LINE__."</font>): ".CACHE_PROBLEMS_DETECTED);
+                       addFatalMessage(__METHOD__, __LINE__, "(<font color=\"#0000aa\">".__LINE__."</font>): ".getMessage('CACHE_PROBLEMS_DETECTED'));
                }
        }
 
@@ -141,7 +146,7 @@ class CacheSystem {
                        }
                } else {
                        // Cannot create file
-                       addFatalMessage(__METHOD__, __LINE__, "(<font color=\"#0000aa\">".__LINE__."</font>): ".CACHE_PROBLEMS_DETECTED);
+                       addFatalMessage(__METHOD__, __LINE__, "(<font color=\"#0000aa\">".__LINE__."</font>): ".getMessage('CACHE_PROBLEMS_DETECTED'));
                }
        }
 
@@ -155,7 +160,7 @@ class CacheSystem {
                        fclose($this->pointer);
 
                        // Set rights
-                       if (FILE_READABLE($this->inc)) chmod($this->inc, 0666);
+                       if ($this->isCacheReadable()) chmod($this->fqfn, 0666);
 
                        // Remove pointer
                        $this->pointer = false;
@@ -171,13 +176,13 @@ class CacheSystem {
                } // END - if
 
                // Is the cache file there?
-               if (FILE_READABLE($this->inc)) {
+               if ($this->isCacheReadable()) {
                        // Prepare temporary array
                        $data = array();
                        $cache_version = null;
 
                        // Load cache file
-                       LOAD_INC_ONCE($this->inc);
+                       require($this->inc);
 
                        // Is there an array?
                        if (is_array($data)) {
@@ -204,37 +209,37 @@ class CacheSystem {
                        }
                } else {
                        // Cache file not found or not readable
-                       addFatalMessage(__METHOD__, __LINE__, "(<font color=\"#0000aa\">".__LINE__."</font>): ".CACHE_CANNOT_LOAD_1.$this->inc.CACHE_CANNOT_LOAD_2);
+                       addFatalMessage(__METHOD__, __LINE__, "(<font color=\"#0000aa\">".__LINE__."</font>): ".CACHE_CANNOT_LOAD_1.$this->fqfn.CACHE_CANNOT_LOAD_2);
                }
        }
 
        // Destroy an existing cache file
        function destroyCacheFile () {
                // Is the cache file there?
-               if ((!isset($this->rebuilt[$this->name])) && (FILE_READABLE($this->inc))) {
+               if ((!isset($this->rebuilt[$this->name])) && ($this->isCacheReadable())) {
                        // Close cache
                        $this->finalize();
 
                        // Remove cache file from system
                        //* DEBUG: */ print __METHOD__."(<font color=\"#0000aa\">".__LINE__."</font>): {$this->name} - DESTROYED!<br />\n";
-                       unlink($this->inc);
+                       unlink($this->fqfn);
 
                        // Is the file there?
-                       if (!FILE_READABLE($this->inc)) {
+                       if (!$this->isCacheReadable()) {
                                // The cache does no longer exist so kill the content
                                unset($this->data[$this->name]);
                                unset($this->version[$this->name]);
                                $this->rebuilt[$this->name] = true;
                        } else {
                                // Not removed!
-                               addFatalMessage(__METHOD__, __LINE__, "(<font color=\"#0000aa\">".__LINE__."</font>): ".CACHE_CANNOT_UNLINK_1.$this->inc.CACHE_CANNOT_UNLINK_2);
+                               addFatalMessage(__METHOD__, __LINE__, "(<font color=\"#0000aa\">".__LINE__."</font>): ".CACHE_CANNOT_UNLINK_1.$this->fqfn.CACHE_CANNOT_UNLINK_2);
                        }
                } // END - if
        }
 
        // Unused method:
        function removeEntry ($search, $data, $array) {
-               if ((FILE_READABLE($this->inc)) && (is_writeable($this->inc))) {
+               if (($this->isCacheReadable()) && (is_writeable($this->fqfn))) {
                        // Load cache into dummy array
                        $dummy = $this->getArrayFromCache();
 
@@ -258,7 +263,7 @@ class CacheSystem {
                        }
                } else {
                        // Cannot write to cache!
-                       addFatalMessage(__METHOD__, __LINE__, "(<font color=\"#0000aa\">".__LINE__."</font>): ".CACHE_PROBLEMS_DETECTED);
+                       addFatalMessage(__METHOD__, __LINE__, "(<font color=\"#0000aa\">".__LINE__."</font>): ".getMessage('CACHE_PROBLEMS_DETECTED'));
                }
        }
 
@@ -282,13 +287,13 @@ class CacheSystem {
                        } // END - foreach
                } else {
                        // Cannot write array!
-                       addFatalMessage(__METHOD__, __LINE__, "(<font color=\"#0000aa\">".__LINE__."</font>): ".CACHE_PROBLEMS_DETECTED);
+                       addFatalMessage(__METHOD__, __LINE__, "(<font color=\"#0000aa\">".__LINE__."</font>): ".getMessage('CACHE_PROBLEMS_DETECTED'));
                }
        }
 
        // Unused method
        function replaceEntry ($search, $replace, $search_key, $array) {
-               if ((FILE_READABLE($this->inc)) && (is_writeable($this->inc))) {
+               if (($this->isCacheReadable()) && (is_writeable($this->fqfn))) {
                        // Load cache into dummy array
                        $dummy = $this->getArrayFromCache();
 
@@ -319,10 +324,11 @@ class CacheSystem {
                        } // END - if
                } else {
                        // Cannot write to cache!
-                       addFatalMessage(__METHOD__, __LINE__, "(<font color=\"#0000aa\">".__LINE__."</font>): ".CACHE_PROBLEMS_DETECTED);
+                       addFatalMessage(__METHOD__, __LINE__, "(<font color=\"#0000aa\">".__LINE__."</font>): ".getMessage('CACHE_PROBLEMS_DETECTED'));
                }
        }
 
+       // Writes the version of given extension to the cache file
        function storeExtensionVersion ($ext_name) {
                // Valid cache pointer?
                if (is_resource($this->pointer)) {
@@ -337,10 +343,11 @@ class CacheSystem {
                        //* DEBUG: */ print __METHOD__."(<font color=\"#0000aa\">".__LINE__."</font>): {$this->name} - {$ext_name}={$ext_ver}<br />\n";
                } else {
                        // Cannot create file
-                       addFatalMessage(__METHOD__, __LINE__, "(<font color=\"#0000aa\">".__LINE__."</font>): ".CACHE_PROBLEMS_DETECTED);
+                       addFatalMessage(__METHOD__, __LINE__, "(<font color=\"#0000aa\">".__LINE__."</font>): ".getMessage('CACHE_PROBLEMS_DETECTED'));
                }
        }
 
+       // Checks wether versions from cache and extension matches
        function extensionVersionMatches ($ext_name) {
                // Load cache (dummy)
                $this->getArrayFromCache();
@@ -353,13 +360,15 @@ class CacheSystem {
                        //* DEBUG: */ print __METHOD__."(<font color=\"#0000aa\">".__LINE__."</font>): cache={$this->name},ext_name={$ext_name} - {$ext_ver}/{$this->version[$this->name][$ext_name]}<br />\n";
                } else {
                        // No cache version found!
-                       DEBUG_LOG(__METHOD__, __LINE__, "Cache {$this->name} has missing entry for extension {$ext_name}!");
+                       DEBUG_LOG(__METHOD__, __LINE__, "Cache {$this->name} has missing version entry for extension {$ext_name}!");
                }
 
                // Compare both
                return ((isset($this->version[$this->name][$ext_name])) && ($this->version[$this->name][$ext_name] == $ext_ver));
        }
 
+       // Rewrit the entry so it can be stored in cache file
+       // @TODO Add support for more types which break in last else-block
        function rewriteEntry ($key, $value) {
                // Init line
                $line = "";
@@ -374,8 +383,10 @@ class CacheSystem {
                } elseif (is_bool($value)) {
                        // Boolean value
                        if ($value === true) {
+                               // True
                                $line = "\$data['".$key."'][] = true;\n";
                        } else {
+                               // False
                                $line = "\$data['".$key."'][] = false;\n";
                        }
                } else {
@@ -387,10 +398,16 @@ class CacheSystem {
                return $line;
        }
 
+       // Getter for cache status
        function getStatus () {
                return $this->ret;
        }
-}
+
+       // Checks wether the current cache file is readable
+       function isCacheReadable () {
+               return INCLUDE_READABLE($this->inc);
+       }
+} // END - class
 
 // Destroy the cache on extension changes
 function FILTER_CACHE_DESTROY_ON_EXT_CHANGE ($data) {
index eaef396db5be454ed8e2037b4e14698833c37440..7c467d94b6f2a25ea03ca5e2e7d55c0e054a13db 100644 (file)
@@ -1556,8 +1556,8 @@ LIMIT 1",
        return $nextId;
 }
 // -----------------------------------------------------------------------------
-// PLEASE DO NOT ADD ANY OTHER FUNCTIONS BELOW THIS LINE ELSE THEY "WRAP" THE
-// $GLOBALS['cache_array']['surfbar'] ARRAY!
+// PLEASE DO NOT ADD ANY OTHER FUNCTIONS BELOW THIS LINE IF THEY DON'T "WRAP"
+// THE $GLOBALS['cache_array']['surfbar'] ARRAY!
 // -----------------------------------------------------------------------------
 // Private getter for data elements
 function SURFBAR_GET_DATA ($element) {
index d33fd898750a0593399539d04bc3416b64b5b786..49dcaa861183b006e31fcd24cde2be89885025b7 100644 (file)
@@ -89,7 +89,7 @@ function WERNIS_SEND_REQUEST ($scriptName, $requestData =  array()) {
        } // END - if
 
        // Add more request data
-       $requestData['api_id']  = bigintval(getConfig('wernis_api_id'));
+       $requestData['api_id']  = getConfig(('wernis_api_id'));
        $requestData['api_key'] = getConfig('wernis_api_md5');
 
        // Construct the request string
index 41ea321a7f24ec44204e5069f09c985257954e14..61116d9bba26b081ccf492f427f7e90b9d5084d8 100644 (file)
@@ -82,14 +82,14 @@ function YOOMEDIA_QUERY_API ($script, $countQuery = true) {
                // Prepare the low-level request
                $requestString = sprintf("http://www.yoomedia.de/interface_2.0/%s?id=%s&sid=%s&pw=%s&reload=%s&ma=%s&uebrig=%s&verguetung=%s&erotik=%s",
                        $script,
-                       bigintval(getConfig('yoomedia_id')),
-                       bigintval(getConfig('yoomedia_sid')),
+                       getConfig(('yoomedia_id')),
+                       getConfig(('yoomedia_sid')),
                        getConfig('yoomedia_passwd'),
-                       bigintval(getConfig('yoomedia_tm_max_reload')),
-                       bigintval(getConfig('yoomedia_tm_min_wait')),
-                       bigintval(getConfig('yoomedia_tm_clicks_remain')),
-                       bigintval(getConfig('yoomedia_tm_min_pay')),
-                       bigintval(getConfig('yoomedia_erotic_allowed'))
+                       getConfig(('yoomedia_tm_max_reload')),
+                       getConfig(('yoomedia_tm_min_wait')),
+                       getConfig(('yoomedia_tm_clicks_remain')),
+                       getConfig(('yoomedia_tm_min_pay')),
+                       getConfig(('yoomedia_erotic_allowed'))
                );
 
                // Run the query
index 1a602766278e974360ffe70fbea6ef8dc604e785..4bdef3483a2f7bcba5833624a43b5584580cfa83 100644 (file)
@@ -37,11 +37,8 @@ if (!defined('__SECURITY')) {
        require($INC);
 }
 
-// Load more cache includes
-$INC_POOL = GET_DIR_AS_ARRAY("inc/loader/", "load_cache-");
-
 // Run the filter
-runFilterChain('load_includes', $INC_POOL);
+runFilterChain('load_includes', GET_DIR_AS_ARRAY("inc/loader/", "load_cache-"));
 
 //
 ?>
index dff3faf065ea10ab34d3cec70f0face778c14692..dd8c722038b1ea7c5a1294a041e6114c6d9ba3c3 100644 (file)
@@ -10,6 +10,8 @@
  * -------------------------------------------------------------------- *
  * Kurzbeschreibung  : Alle Erweiterungen laden                         *
  * -------------------------------------------------------------------- *
+ * @TODO Rewrite this whole file to load_cache-extensions.php           *
+ * -------------------------------------------------------------------- *
  *                                                                      *
  * -------------------------------------------------------------------- *
  * Copyright (c) 2003 - 2008 by Roland Haeder                           *
@@ -113,7 +115,7 @@ if ($GLOBALS['cacheMode'] == "load") {
                $GLOBALS['cache_instance']->destroyCacheFile();
 
                // Retry it
-               LOAD_INC(__FILE__);
+               require(__FILE__);
                return;
        } // END -  if
 
index 3237733fe01668ea4411fd2c25640c997ec8db01..7ffffb8c6e1f690152b613e7831658889161612c 100644 (file)
@@ -102,8 +102,8 @@ ORDER BY login", __FILE__, __LINE__);
        // Close cache
        $GLOBALS['cache_instance']->finalize();
 
-       // Reload the cache
-       LOAD_INC(__FILE__);
+       // Include loader again
+       require(__FILE__);
 }
 
 // Next cached table are the admins_acls...
@@ -132,8 +132,8 @@ if (GET_EXT_VERSION("admins") >= "0.3") {
                // Close cache
                $GLOBALS['cache_instance']->finalize();
 
-               // Reload the cache
-               LOAD_INC(__FILE__);
+               // Include loader again
+               require(__FILE__);
        }
 } // END - if
 
index ad5b5dfcd9cda20226beaa996f41e9e1c1c8acde..ad3342a43574d82a7f8ea23f902579883e0f7235 100644 (file)
@@ -61,8 +61,8 @@ if (($GLOBALS['cache_instance']->loadCacheFile("config", true)) && ($GLOBALS['ca
        // Close the cache
        $GLOBALS['cache_instance']->finalize();
 
-       // Reload the cache
-       LOAD_INC(__FILE__);
+       // Include loader again
+       require(__FILE__);
 }
 
 //
index 0ff8842588a00683426f011fca881347e9296cdd..03489db89917261cbee2f071354aa86c55200102 100644 (file)
@@ -91,8 +91,8 @@ FROM `{!_MYSQL_PREFIX!}_mod_reg` ORDER BY `id`", __FILE__, __LINE__);
        // Close the cache
        $GLOBALS['cache_instance']->finalize();
 
-       // Reload the cache
-       LOAD_INC(__FILE__);
+       // Include loader again
+       require(__FILE__);
 }
 
 //
index 4e73cb15f0e7cd9c80afa1fb5515fd5ede226b3b..5658eae645aec3617e6365db3cb7866092188436 100644 (file)
@@ -59,8 +59,8 @@ if (($GLOBALS['cache_instance']->loadCacheFile("refdepths")) && ($GLOBALS['cache
        // Close the cache
        $GLOBALS['cache_instance']->finalize();
 
-       // Reload the cache
-       LOAD_INC(__FILE__);
+       // Include loader again
+       require(__FILE__);
 }
 
 //
index e87dbf022f863065ee0fc85cfd316e5545d5f3bb..8c2080d3265eba63206e602786e7c2c481e9635f 100644 (file)
@@ -59,8 +59,8 @@ if (($GLOBALS['cache_instance']->loadCacheFile("refsystem")) && ($GLOBALS['cache
        // Close the cache
        $GLOBALS['cache_instance']->finalize();
 
-       // Reload the cache
-       LOAD_INC(__FILE__);
+       // Include loader again
+       require(__FILE__);
 }
 
 //
index fcfd809967a2d8bc93a2f9b3b3d4faf1fee2bba6..299935f40d3cb06eb5819e5760c6bb17b6e81fb8 100644 (file)
@@ -86,8 +86,8 @@ if (($GLOBALS['cache_instance']->loadCacheFile("themes")) && ($GLOBALS['cache_in
        // Close the cache
        $GLOBALS['cache_instance']->finalize();
 
-       // Reload the cache
-       LOAD_INC(__FILE__);
+       // Include loader again
+       require(__FILE__);
 }
 
 //
index f73c5c7782f40c452769ac04fabbe07a0b04019c..104f4e6bbd00feac914289a2d69db37da9eefb56 100644 (file)
@@ -305,7 +305,7 @@ function ADD_ADMIN_MENU($act, $wht, $return=false) {
        $GLOBALS['menu']['title'] = array();
 
        // Is there a cache instance?
-       if ((isset($GLOBALS['cache_instance'])) && (is_object($GLOBALS['cache_instance'])) && (getConfig('cache_admin_menu') == "Y")) {
+       if ((isCacheInstanceValid()) && (getConfig('cache_admin_menu') == "Y")) {
                // Create cache name
                $cacheName = "admin_".$act."_".$wht."_".GET_LANGUAGE()."_".strtolower(get_session('admin_login'));
 
@@ -444,7 +444,7 @@ function ADD_ADMIN_MENU($act, $wht, $return=false) {
        eval($eval);
 
        // Is there a cache instance again?
-       if ((isset($GLOBALS['cache_instance'])) && (is_object($GLOBALS['cache_instance'])) && (getConfig('cache_admin_menu') == "Y")) {
+       if ((isCacheInstanceValid()) && (getConfig('cache_admin_menu') == "Y")) {
                // Init cache
                $GLOBALS['cache_instance']->init($cacheName);
 
index 8b26a7b621605422cf22ca1e7bdc1d13393759be..b1d8d571300a1a8b1eeddf65b7a79b0f5f081c8b 100644 (file)
@@ -62,8 +62,8 @@ if (IS_FORM_SENT()) {
 }  else {
        // Prepare data for template output
        $content = array(
-               'min_payout'    => bigintval(getConfig('primera_min_payout')),
-               'min_withdraw'  => bigintval(getConfig('primera_min_withdraw')),
+               'min_payout'    => getConfig(('primera_min_payout')),
+               'min_withdraw'  => getConfig(('primera_min_withdraw')),
                'api_name'              => getConfig('primera_api_name'),
                'api_md5'               => getConfig('primera_api_md5'),
                'refid'                 => getConfig('primera_refid')
index 599f4b7339526c75292ea35c18b7a3cfc4429dbe..3edee5496ad042d5c0a68ef309634d5f2359c263 100644 (file)
@@ -46,8 +46,8 @@ if (IS_FORM_SENT()) {
 } else {
        // Prepare content
        $content = array(
-               'refback_min_perc' => bigintval(getConfig('refback_min_perc')),
-               'refback_max_perc' => bigintval(getConfig('refback_max_perc'))
+               'refback_min_perc' => getConfig(('refback_min_perc')),
+               'refback_max_perc' => getConfig(('refback_max_perc'))
        );
 
        // Add more content
index 29320d186341e96c6a9249cfeb9b463abf40822c..c71158873449b00e46c4a05889579f7dafd9e8e2 100644 (file)
@@ -46,9 +46,9 @@ if (IS_FORM_SENT()) {
 }
 
 // Prepare constants for template
-define('__TRANS_MAX_VALUE'    , bigintval(getConfig('transfer_max')));
-define('__TRANS_BALANCE_VALUE', bigintval(getConfig('transfer_balance')));
-define('__TRANS_CODE_VALUE'   , bigintval(getConfig('transfer_code')));
+define('__TRANS_MAX_VALUE'    , getConfig(('transfer_max')));
+define('__TRANS_BALANCE_VALUE', getConfig(('transfer_balance')));
+define('__TRANS_CODE_VALUE'   , getConfig(('transfer_code')));
 
 // Autppurge expired transfer entries?
 switch (getConfig('ap_transfer')) {
index 1dc18f61836cdabf6ee10faf6b81bee611e23322..87518851f97dd0aba49f6461538337b60da1ddf9 100644 (file)
@@ -64,18 +64,18 @@ if (IS_FORM_SENT()) {
 }  else {
        // Prepare data for template output
        $content = array(
-               'min_payout'           => bigintval(getConfig('wernis_min_payout')),
-               'min_withdraw'         => bigintval(getConfig('wernis_min_withdraw')),
-               'api_id'               => bigintval(getConfig('wernis_api_id')),
+               'min_payout'           => getConfig(('wernis_min_payout')),
+               'min_withdraw'         => getConfig(('wernis_min_withdraw')),
+               'api_id'               => getConfig(('wernis_api_id')),
                'api_md5'              => getConfig('wernis_api_md5'),
                'api_url'              => getConfig('wernis_api_url'),
-               'refid'                => bigintval(getConfig('wernis_refid')),
+               'refid'                => getConfig(('wernis_refid')),
                'payout_factor'        => TRANSLATE_COMMA(getConfig('wernis_payout_factor')),
                'withdraw_factor'      => TRANSLATE_COMMA(getConfig('wernis_withdraw_factor')),
                'payout_fee_percent'   => TRANSLATE_COMMA(getConfig('wernis_payout_fee_percent')),
                'withdraw_fee_percent' => TRANSLATE_COMMA(getConfig('wernis_withdraw_fee_percent')),
-               'payout_fee_fix'       => bigintval(getConfig('wernis_payout_fee_fix')),
-               'withdraw_fee_fix'     => bigintval(getConfig('wernis_withdraw_fee_fix'))
+               'payout_fee_fix'       => getConfig(('wernis_payout_fee_fix')),
+               'withdraw_fee_fix'     => getConfig(('wernis_withdraw_fee_fix'))
        );
 
        // Prepare payout Y/N selection
index b5b4c17c3736e2f4db44e584d45badd5152929a8..dfb103df315121b86021d7f4af7ea31736ede595 100644 (file)
@@ -56,13 +56,13 @@ if (IS_FORM_SENT()) {
 } else {
        // Prepare content
        $content = array(
-               'yoomedia_id'               => bigintval(getConfig('yoomedia_id')),
-               'yoomedia_sid'              => bigintval(getConfig('yoomedia_sid')),
+               'yoomedia_id'               => getConfig(('yoomedia_id')),
+               'yoomedia_sid'              => getConfig(('yoomedia_sid')),
                'yoomedia_passwd'           => getConfig('yoomedia_passwd'),
-               'yoomedia_tm_max_reload'    => bigintval(getConfig('yoomedia_tm_max_reload')),
-               'yoomedia_tm_min_wait'      => bigintval(getConfig('yoomedia_tm_min_wait')),
-               'yoomedia_tm_clicks_remain' => bigintval(getConfig('yoomedia_tm_clicks_remain')),
-               'yoomedia_tm_min_pay'       => bigintval(getConfig('yoomedia_tm_min_pay'))
+               'yoomedia_tm_max_reload'    => getConfig(('yoomedia_tm_max_reload')),
+               'yoomedia_tm_min_wait'      => getConfig(('yoomedia_tm_min_wait')),
+               'yoomedia_tm_clicks_remain' => getConfig(('yoomedia_tm_clicks_remain')),
+               'yoomedia_tm_min_pay'       => getConfig(('yoomedia_tm_min_pay'))
        );
 
        // Erotic?
index 4a1c8d780671e3798e050c6c3114df3526690fb5..5b5bddfacc25b1678bd3dbf34c3afa9612da6bd6 100644 (file)
@@ -94,7 +94,7 @@ if (empty($response[0]) && empty($response[1]) && empty($response[2]) && empty($
 
                                // I have removed the addional test for the stored timemark in database or you cannot find
                                // new updates on my server when you haven't installed it before I upload a patch... :-(
-                               if (bigintval($TEST) > bigintval(getConfig('patch_level'))) {
+                               if (bigintval($TEST) > getConfig(('patch_level'))) {
                                        // Copy every data from the response array
                                        $PATCHES['fname'][] = str_replace("\n", "", $response[$idx * 5 + 2]);
                                        $PATCHES['fsize'][] = str_replace("\n", "", $response[$idx * 5 + 3]);
index b89deb4f415e5afdbb112f77293833b3d26fb1f7..927fa84e69ae92006e8350cf4beb8f4d788b8eeb 100644 (file)
@@ -60,7 +60,7 @@ $content = array(); $points = false;
 // Is the mode set (payout only)
 if (!REQUEST_ISSET_GET(('mode'))) {
        // Get referal id
-       $content['refid'] = bigintval(getConfig('primera_refid'));
+       $content['refid'] = getConfig(('primera_refid'));
 
        // Get Primus id
        $result = SQL_QUERY_ESC("SELECT primera_userid FROM `{!_MYSQL_PREFIX!}_user_data` WHERE userid=%s LIMIT 1",
@@ -170,7 +170,7 @@ if ((IS_FORM_SENT()) && (REQUEST_ISSET_GET(('mode')))) {
                                LOAD_TEMPLATE("admin_settings_saved", false, getMessage('PRIMERA_MEMBER_INVALID_AMOUNT'));
                        } elseif (REQUEST_POST('amount') < getConfig('primera_min_payout')) {
                                // Not enougth entered!
-                               LOAD_TEMPLATE("admin_settings_saved", false, sprintf(getMessage('PRIMERA_MEMBER_AMOUNT_SMALLER_MIN'), bigintval(getConfig('primera_min_payout'))));
+                               LOAD_TEMPLATE("admin_settings_saved", false, sprintf(getMessage('PRIMERA_MEMBER_AMOUNT_SMALLER_MIN'), getConfig(('primera_min_payout'))));
                        } elseif (REQUEST_POST('amount') > $points) {
                                // Not enougth points left!
                                LOAD_TEMPLATE("admin_settings_saved", false, sprintf(getMessage('PRIMERA_MEMBER_PAYOUT_POINTS_DEPLETED'), bigintval(REQUEST_POST('amount')), bigintval($points)));
index 7f3cedff750071dd5a5c2f05cca73151d0791861..1f06a6e9b1f6ca130abc8437c4326e8f7e589b33 100644 (file)
@@ -59,7 +59,7 @@ $content = array(); $points = false;
 // Is the mode set (withdraw or payout)
 if ((!REQUEST_ISSET_GET(('mode'))) || (REQUEST_GET('mode') == "choose")) {
        // Let the user choose what he wants to do
-       $content['refid']    = bigintval(getConfig('wernis_refid'));
+       $content['refid']    = getConfig(('wernis_refid'));
        $content['wds66_id'] = 0;
 
        // Get WDS66 id
@@ -219,7 +219,7 @@ if ((IS_FORM_SENT()) && (REQUEST_ISSET_GET(('mode')))) {
                        case "withdraw": // Widthdraws WDS66 -> This exchange
                                if (REQUEST_POST('amount') < getConfig('wernis_min_withdraw')) {
                                        // Not enougth entered!
-                                       LOAD_TEMPLATE("admin_settings_saved", false, sprintf(getMessage('WERNIS_MEMBER_AMOUNT_SMALLER_MIN'), bigintval(getConfig('wernis_min_withdraw'))));
+                                       LOAD_TEMPLATE("admin_settings_saved", false, sprintf(getMessage('WERNIS_MEMBER_AMOUNT_SMALLER_MIN'), getConfig(('wernis_min_withdraw'))));
                                } else {
                                        // All is fine here so do the withdraw
                                        $success = WERNIS_EXECUTE_WITHDRAW(REQUEST_POST('wds66_id'), md5(REQUEST_POST('wds66_password')), REQUEST_POST('amount'));
@@ -248,7 +248,7 @@ if ((IS_FORM_SENT()) && (REQUEST_ISSET_GET(('mode')))) {
                        case "payout": // Payout this exchange -> WDS66
                                if (REQUEST_POST('amount') < getConfig('wernis_min_payout')) {
                                        // Not enougth entered!
-                                       LOAD_TEMPLATE("admin_settings_saved", false, sprintf(getMessage('WERNIS_MEMBER_AMOUNT_SMALLER_MIN'), bigintval(getConfig('wernis_min_payout'))));
+                                       LOAD_TEMPLATE("admin_settings_saved", false, sprintf(getMessage('WERNIS_MEMBER_AMOUNT_SMALLER_MIN'), getConfig(('wernis_min_payout'))));
                                } elseif (REQUEST_POST('amount') > $points) {
                                        // Not enougth points left!
                                        LOAD_TEMPLATE("admin_settings_saved", false, sprintf(getMessage('WERNIS_MEMBER_PAYOUT_POINTS_DEPLETED'), bigintval(REQUEST_POST('amount')), bigintval($points)));
index e4c4e8e7b9b6836dcc83adde986be4bca9dde1f6..69f4a902ed10268cf460c24bdf934a96b23a5e9d 100644 (file)
@@ -50,12 +50,12 @@ $curr = date("m", time());
 if (($curr != getConfig('last_month')) && (getConfig('last_month') > 0) && (getConfig('beg_ranks') > 0) && ($GLOBALS['output_mode'] != 1)) {
        // Extension "autopurge" is inactive or purging of inactive accounts is deactivated
        $whereStatement1 = "";
-       $whereStatement2 = bigintval(getConfig('beg_ranks'));
+       $whereStatement2 = getConfig(('beg_ranks'));
 
        // Shall we exclude webmaster's own userid?
        if ((getConfig('beg_include_own') != "Y") && (getConfig('beg_uid') > 0)) {
                // Exclude it
-               $whereStatement1 = sprintf(" AND userid != %s", bigintval(getConfig('beg_uid')));
+               $whereStatement1 = sprintf(" AND userid != %s", getConfig(('beg_uid')));
        } // END - if
 
        // Let's check if there are some points left we can "pay"...
@@ -63,7 +63,7 @@ if (($curr != getConfig('last_month')) && (getConfig('last_month') > 0) && (getC
                // Use last online stamp only when autopurge for inactive members is activated
                if ((getConfig('ap_inactive_since') > 0) && (getConfig('beg_active') == "Y")) {
                        // Okay, include last online timestamp
-                       $whereStatement1 .= sprintf(" AND last_online >= (UNIX_TIMESTAMP() - %s)", bigintval(getConfig('ap_inactive_since')));;
+                       $whereStatement1 .= sprintf(" AND last_online >= (UNIX_TIMESTAMP() - %s)", getConfig(('ap_inactive_since')));;
                } // END - if
        } // END - if
 
index c4c7e8d0c791b96c9da28ebbe56dc41b1f8b061f..49c02b348b71bf75dbb4635bc68e67f979994eb6 100644 (file)
@@ -49,7 +49,7 @@ $curr = date("m", time());
 if (($curr != getConfig('last_month')) && (getConfig('bonus_ranks') > 0) && ($GLOBALS['output_mode'] != 1)) {
        // Extension "autopurge" is inactive or purging of inactive accounts is deactivated
        $whereStatement1 = "WHERE `status`='CONFIRMED'";
-       $whereStatement2 = bigintval(getConfig('bonus_ranks'));
+       $whereStatement2 = getConfig(('bonus_ranks'));
 
        // Shall I keep inactive members away from here? (mostly wanted in an "active-rallye" ...)
        if (EXT_IS_ACTIVE("autopurge")) {
@@ -57,7 +57,7 @@ if (($curr != getConfig('last_month')) && (getConfig('bonus_ranks') > 0) && ($GL
                if (getConfig('ap_inactive_since') > 0) {
                        // Okay, include last online timestamp
                        $whereStatement1 = sprintf("WHERE `status`='CONFIRMED' AND last_online >= (UNIX_TIMESTAMP() - %s)", getConfig('ap_inactive_since'));
-                       $whereStatement2 = bigintval(getConfig('bonus_ranks'));
+                       $whereStatement2 = getConfig(('bonus_ranks'));
                } // END - if
        } // END - if
 
index ac66385eb898089920bafbc0f839a3fee68f810d..46c7002bc5baa1c9e225153d9a67b4a140712fff 100644 (file)
@@ -46,11 +46,8 @@ if (isResetModeEnabled()) {
 // Init counter
 $GLOBALS['pool_cnt'] = 0;
 
-// Load more cache includes
-$INC_POOL = GET_DIR_AS_ARRAY("inc/pool/", "pool-");
-
 // Run the filter
-runFilterChain('load_includes', $INC_POOL);
+runFilterChain('load_includes', GET_DIR_AS_ARRAY("inc/pool/", "pool-"));
 
 // Remove counter again
 unset($GLOBALS['pool_cnt']);