public static function disable_caching() { self::$enable_caching = FALSE; }
private function getAllExtensionIds() { $result = array(); $paths = $this->getExtensionPaths(); $cache_status = CacheSettings::caching_enabled(); CacheSettings::enable_caching(); $cache = get_cache_function("extensionmaster", 3600); foreach ($paths as $path) { $result += $cache->call(array($this, "searchForExtensions"), $path); //$result += $this->searchForExtensions($path); } if (!$cache_status) { CacheSettings::disable_caching(); } if (defined("EXTENSIONS_WHITELIST") && EXTENSIONS_WHITELIST != "") { $whitelist = explode(",", EXTENSIONS_WHITELIST); $whitelist = array_trim($whitelist); $result = array_intersect($whitelist, $result); } if (BLACKLISTED_EXTENSIONS != "") { $parts = explode(",", BLACKLISTED_EXTENSIONS); $parts = array_trim($parts); } else { $parts = array(); } $result = array_diff($result, array_intersect($parts, $result)); return $result; }
<?php include_once dirname(__FILE__) . '/etc/local.def.php'; include_once dirname(__FILE__) . '/etc/default.def.php'; include_once PATH_ETC . 'php.def.php'; include_once PATH_ETC . 'core.def.php'; include_once PATH_ETC . 'php.conf.php'; include_once PATH_ETC . 'core.conf.php'; if (strstr(strtolower(urldecode($_SERVER['REQUEST_URI'])), "/asset/")) { $cache_status = CacheSettings::caching_enabled(); CacheSettings::enable_caching(); $cache = get_cache_function("asset", 3600); $em = ExtensionMaster::getInstance(); $cache->call(array(&$em, "handleRequest")); if (!$cache_status) { CacheSettings::disable_caching(); } } else { ExtensionMaster::getInstance()->handleRequest(); }