diff -r d2d4e40ecd29 -r 935f3799b654 includes/plugins.php --- a/includes/plugins.php Mon Jul 07 02:50:17 2008 -0400 +++ b/includes/plugins.php Mon Jul 07 18:12:30 2008 -0400 @@ -446,7 +446,6 @@ $this->update_plugins_cache($plugin_info); $GLOBALS['plugins_cache'] = $plugin_info; - @define('ENANO_PLUGINS_CACHE_LOADED', true); } /** @@ -457,26 +456,8 @@ function update_plugins_cache($plugin_info) { - $plugin_info = Language::var_export_string($plugin_info); - - $file = ENANO_ROOT . '/cache/cache_plugins.php'; - $fh = @fopen($file, 'w'); - if ( !$fh ) - // can't open for writing - return false; - - $contents = <<store('plugins', $plugin_info, -1); } /** @@ -485,9 +466,10 @@ function load_plugins_cache() { - if ( file_exists(ENANO_ROOT . '/cache/cache_plugins.php') && !defined('ENANO_PLUGINS_CACHE_LOADED') ) + global $cache; + if ( $data = $cache->fetch('plugins') ) { - require(ENANO_ROOT . '/cache/cache_plugins.php'); + $GLOBALS['plugins_cache'] = $data; } }