From b7aada7890a3c7d1c1da4d2b36d8d7683fa61c06 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Roland=20H=C3=A4der?= Date: Wed, 4 Mar 2009 18:15:58 +0000 Subject: [PATCH] Fixes/rewrites for 'dublicate entry' bug --- inc/autopurge.php | 5 +- inc/autopurge/purge-inact.php | 4 +- inc/autopurge/purge-mails.php | 8 +-- inc/autopurge/purge-tsks.php | 2 +- inc/autopurge/purge-unconfirmed.php | 2 +- inc/databases.php | 2 +- inc/db/lib-mysql3.php | 4 +- inc/doubler_send.php | 2 +- inc/extensions.php | 2 +- inc/extensions/ext-cache.php | 4 +- inc/extensions/ext-sql_patches.php | 2 +- inc/functions.php | 17 +++--- inc/libs/cache_functions.php | 61 ++++++++++++++-------- inc/libs/surfbar_functions.php | 4 +- inc/libs/wernis_functions.php | 2 +- inc/libs/yoomedia_functions.php | 14 ++--- inc/load_cache.php | 5 +- inc/load_extensions.php | 4 +- inc/loader/load_cache-admin.php | 8 +-- inc/loader/load_cache-config.php | 4 +- inc/loader/load_cache-modreg.php | 4 +- inc/loader/load_cache-refdepths.php | 4 +- inc/loader/load_cache-refsystem.php | 4 +- inc/loader/load_cache-them.php | 4 +- inc/modules/admin/admin-inc.php | 4 +- inc/modules/admin/what-config_primera.php | 4 +- inc/modules/admin/what-config_refback.php | 4 +- inc/modules/admin/what-config_transfer.php | 6 +-- inc/modules/admin/what-config_wernis.php | 12 ++--- inc/modules/admin/what-config_yoomedia.php | 12 ++--- inc/modules/admin/what-updates.php | 2 +- inc/modules/member/what-primera.php | 4 +- inc/modules/member/what-wernis.php | 6 +-- inc/monthly/monthly_beg.php | 6 +-- inc/monthly/monthly_bonus.php | 4 +- inc/pool-update.php | 5 +- 36 files changed, 128 insertions(+), 113 deletions(-) diff --git a/inc/autopurge.php b/inc/autopurge.php index 72b242a0b4..aec79e6cc3 100644 --- a/inc/autopurge.php +++ b/inc/autopurge.php @@ -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'); diff --git a/inc/autopurge/purge-inact.php b/inc/autopurge/purge-inact.php index c015fc56da..adb04be8cb 100644 --- a/inc/autopurge/purge-inact.php +++ b/inc/autopurge/purge-inact.php @@ -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) diff --git a/inc/autopurge/purge-mails.php b/inc/autopurge/purge-mails.php index 7d5de27783..3970e29008 100644 --- a/inc/autopurge/purge-mails.php +++ b/inc/autopurge/purge-mails.php @@ -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) diff --git a/inc/autopurge/purge-tsks.php b/inc/autopurge/purge-tsks.php index dde1e7c77e..5cdc442315 100644 --- a/inc/autopurge/purge-tsks.php +++ b/inc/autopurge/purge-tsks.php @@ -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 diff --git a/inc/autopurge/purge-unconfirmed.php b/inc/autopurge/purge-unconfirmed.php index baa56db400..8871ffdbda 100644 --- a/inc/autopurge/purge-unconfirmed.php +++ b/inc/autopurge/purge-unconfirmed.php @@ -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) diff --git a/inc/databases.php b/inc/databases.php index 530625402f..de16a5b1b8 100644 --- a/inc/databases.php +++ b/inc/databases.php @@ -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)); diff --git a/inc/db/lib-mysql3.php b/inc/db/lib-mysql3.php index 88a135789b..b325078238 100644 --- a/inc/db/lib-mysql3.php +++ b/inc/db/lib-mysql3.php @@ -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')."
\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 diff --git a/inc/doubler_send.php b/inc/doubler_send.php index fe1f026218..d71492ded8 100644 --- a/inc/doubler_send.php +++ b/inc/doubler_send.php @@ -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 diff --git a/inc/extensions.php b/inc/extensions.php index 9a17fa15c7..ab96062777 100644 --- a/inc/extensions.php +++ b/inc/extensions.php @@ -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__); diff --git a/inc/extensions/ext-cache.php b/inc/extensions/ext-cache.php index 1ce2684b8a..a1ecd0f022 100644 --- a/inc/extensions/ext-cache.php +++ b/inc/extensions/ext-cache.php @@ -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__, "(".__LINE__."): ".CACHE_CANNOT_INITIALIZE); + addFatalMessage(__FILE__, __LINE__, "(".__LINE__."): ".getMessage('CACHE_CANNOT_INITIALIZE')); } // END - if } // END - if break; diff --git a/inc/extensions/ext-sql_patches.php b/inc/extensions/ext-sql_patches.php index b6e9fb8665..c7aef22402 100644 --- a/inc/extensions/ext-sql_patches.php +++ b/inc/extensions/ext-sql_patches.php @@ -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'))); diff --git a/inc/functions.php b/inc/functions.php index bfead5a33e..da1848b706 100644 --- a/inc/functions.php +++ b/inc/functions.php @@ -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 // ////////////////////////////////////////////////// diff --git a/inc/libs/cache_functions.php b/inc/libs/cache_functions.php index 81a695e9cd..bc24b68aae 100644 --- a/inc/libs/cache_functions.php +++ b/inc/libs/cache_functions.php @@ -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, "storeExtensionVersion("cache"); } else { // Cannot create file - addFatalMessage(__METHOD__, __LINE__, "(".__LINE__."): ".CACHE_PROBLEMS_DETECTED); + addFatalMessage(__METHOD__, __LINE__, "(".__LINE__."): ".getMessage('CACHE_PROBLEMS_DETECTED')); } } @@ -141,7 +146,7 @@ class CacheSystem { } } else { // Cannot create file - addFatalMessage(__METHOD__, __LINE__, "(".__LINE__."): ".CACHE_PROBLEMS_DETECTED); + addFatalMessage(__METHOD__, __LINE__, "(".__LINE__."): ".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__, "(".__LINE__."): ".CACHE_CANNOT_LOAD_1.$this->inc.CACHE_CANNOT_LOAD_2); + addFatalMessage(__METHOD__, __LINE__, "(".__LINE__."): ".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__."(".__LINE__."): {$this->name} - DESTROYED!
\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__, "(".__LINE__."): ".CACHE_CANNOT_UNLINK_1.$this->inc.CACHE_CANNOT_UNLINK_2); + addFatalMessage(__METHOD__, __LINE__, "(".__LINE__."): ".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__, "(".__LINE__."): ".CACHE_PROBLEMS_DETECTED); + addFatalMessage(__METHOD__, __LINE__, "(".__LINE__."): ".getMessage('CACHE_PROBLEMS_DETECTED')); } } @@ -282,13 +287,13 @@ class CacheSystem { } // END - foreach } else { // Cannot write array! - addFatalMessage(__METHOD__, __LINE__, "(".__LINE__."): ".CACHE_PROBLEMS_DETECTED); + addFatalMessage(__METHOD__, __LINE__, "(".__LINE__."): ".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__, "(".__LINE__."): ".CACHE_PROBLEMS_DETECTED); + addFatalMessage(__METHOD__, __LINE__, "(".__LINE__."): ".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__."(".__LINE__."): {$this->name} - {$ext_name}={$ext_ver}
\n"; } else { // Cannot create file - addFatalMessage(__METHOD__, __LINE__, "(".__LINE__."): ".CACHE_PROBLEMS_DETECTED); + addFatalMessage(__METHOD__, __LINE__, "(".__LINE__."): ".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__."(".__LINE__."): cache={$this->name},ext_name={$ext_name} - {$ext_ver}/{$this->version[$this->name][$ext_name]}
\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) { diff --git a/inc/libs/surfbar_functions.php b/inc/libs/surfbar_functions.php index eaef396db5..7c467d94b6 100644 --- a/inc/libs/surfbar_functions.php +++ b/inc/libs/surfbar_functions.php @@ -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) { diff --git a/inc/libs/wernis_functions.php b/inc/libs/wernis_functions.php index d33fd89875..49dcaa8611 100644 --- a/inc/libs/wernis_functions.php +++ b/inc/libs/wernis_functions.php @@ -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 diff --git a/inc/libs/yoomedia_functions.php b/inc/libs/yoomedia_functions.php index 41ea321a7f..61116d9bba 100644 --- a/inc/libs/yoomedia_functions.php +++ b/inc/libs/yoomedia_functions.php @@ -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 diff --git a/inc/load_cache.php b/inc/load_cache.php index 1a60276627..4bdef3483a 100644 --- a/inc/load_cache.php +++ b/inc/load_cache.php @@ -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-")); // ?> diff --git a/inc/load_extensions.php b/inc/load_extensions.php index dff3faf065..dd8c722038 100644 --- a/inc/load_extensions.php +++ b/inc/load_extensions.php @@ -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 diff --git a/inc/loader/load_cache-admin.php b/inc/loader/load_cache-admin.php index 3237733fe0..7ffffb8c6e 100644 --- a/inc/loader/load_cache-admin.php +++ b/inc/loader/load_cache-admin.php @@ -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 diff --git a/inc/loader/load_cache-config.php b/inc/loader/load_cache-config.php index ad5b5dfcd9..ad3342a435 100644 --- a/inc/loader/load_cache-config.php +++ b/inc/loader/load_cache-config.php @@ -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__); } // diff --git a/inc/loader/load_cache-modreg.php b/inc/loader/load_cache-modreg.php index 0ff8842588..03489db899 100644 --- a/inc/loader/load_cache-modreg.php +++ b/inc/loader/load_cache-modreg.php @@ -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__); } // diff --git a/inc/loader/load_cache-refdepths.php b/inc/loader/load_cache-refdepths.php index 4e73cb15f0..5658eae645 100644 --- a/inc/loader/load_cache-refdepths.php +++ b/inc/loader/load_cache-refdepths.php @@ -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__); } // diff --git a/inc/loader/load_cache-refsystem.php b/inc/loader/load_cache-refsystem.php index e87dbf022f..8c2080d326 100644 --- a/inc/loader/load_cache-refsystem.php +++ b/inc/loader/load_cache-refsystem.php @@ -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__); } // diff --git a/inc/loader/load_cache-them.php b/inc/loader/load_cache-them.php index fcfd809967..299935f40d 100644 --- a/inc/loader/load_cache-them.php +++ b/inc/loader/load_cache-them.php @@ -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__); } // diff --git a/inc/modules/admin/admin-inc.php b/inc/modules/admin/admin-inc.php index f73c5c7782..104f4e6bbd 100644 --- a/inc/modules/admin/admin-inc.php +++ b/inc/modules/admin/admin-inc.php @@ -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); diff --git a/inc/modules/admin/what-config_primera.php b/inc/modules/admin/what-config_primera.php index 8b26a7b621..b1d8d57130 100644 --- a/inc/modules/admin/what-config_primera.php +++ b/inc/modules/admin/what-config_primera.php @@ -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') diff --git a/inc/modules/admin/what-config_refback.php b/inc/modules/admin/what-config_refback.php index 599f4b7339..3edee5496a 100644 --- a/inc/modules/admin/what-config_refback.php +++ b/inc/modules/admin/what-config_refback.php @@ -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 diff --git a/inc/modules/admin/what-config_transfer.php b/inc/modules/admin/what-config_transfer.php index 29320d1863..c711588734 100644 --- a/inc/modules/admin/what-config_transfer.php +++ b/inc/modules/admin/what-config_transfer.php @@ -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')) { diff --git a/inc/modules/admin/what-config_wernis.php b/inc/modules/admin/what-config_wernis.php index 1dc18f6183..87518851f9 100644 --- a/inc/modules/admin/what-config_wernis.php +++ b/inc/modules/admin/what-config_wernis.php @@ -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 diff --git a/inc/modules/admin/what-config_yoomedia.php b/inc/modules/admin/what-config_yoomedia.php index b5b4c17c37..dfb103df31 100644 --- a/inc/modules/admin/what-config_yoomedia.php +++ b/inc/modules/admin/what-config_yoomedia.php @@ -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? diff --git a/inc/modules/admin/what-updates.php b/inc/modules/admin/what-updates.php index 4a1c8d7806..5b5bddfacc 100644 --- a/inc/modules/admin/what-updates.php +++ b/inc/modules/admin/what-updates.php @@ -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]); diff --git a/inc/modules/member/what-primera.php b/inc/modules/member/what-primera.php index b89deb4f41..927fa84e69 100644 --- a/inc/modules/member/what-primera.php +++ b/inc/modules/member/what-primera.php @@ -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))); diff --git a/inc/modules/member/what-wernis.php b/inc/modules/member/what-wernis.php index 7f3cedff75..1f06a6e9b1 100644 --- a/inc/modules/member/what-wernis.php +++ b/inc/modules/member/what-wernis.php @@ -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))); diff --git a/inc/monthly/monthly_beg.php b/inc/monthly/monthly_beg.php index e4c4e8e7b9..69f4a902ed 100644 --- a/inc/monthly/monthly_beg.php +++ b/inc/monthly/monthly_beg.php @@ -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 diff --git a/inc/monthly/monthly_bonus.php b/inc/monthly/monthly_bonus.php index c4c7e8d0c7..49c02b348b 100644 --- a/inc/monthly/monthly_bonus.php +++ b/inc/monthly/monthly_bonus.php @@ -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 diff --git a/inc/pool-update.php b/inc/pool-update.php index ac66385eb8..46c7002bc5 100644 --- a/inc/pool-update.php +++ b/inc/pool-update.php @@ -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']); -- 2.39.5