summaryrefslogtreecommitdiff
path: root/system/core
diff options
context:
space:
mode:
authorBharat Mediratta <bharat@menalto.com>2010-03-28 21:04:44 -0700
committerBharat Mediratta <bharat@menalto.com>2010-03-28 21:04:44 -0700
commitea43c5f06f5c7242f1d5811fe427e55c87497ecc (patch)
tree7ee253a40c57c8ea8066305e36b633fa2d7500e4 /system/core
parent2eea7b874aa06f08ed58a85197473233b54693aa (diff)
parente8eb23db42bb929548af358452f1b65e16b61913 (diff)
Merge branch 'master' of github.com:gallery/gallery3
Diffstat (limited to 'system/core')
-rw-r--r--system/core/Kohana.php16
1 files changed, 5 insertions, 11 deletions
diff --git a/system/core/Kohana.php b/system/core/Kohana.php
index ae056d0e..f7f6b326 100644
--- a/system/core/Kohana.php
+++ b/system/core/Kohana.php
@@ -32,6 +32,7 @@ abstract class Kohana_Core {
// Include paths
protected static $include_paths;
+ protected static $include_paths_hash = '';
// Cache lifetime
protected static $cache_lifetime;
@@ -365,14 +366,7 @@ abstract class Kohana_Core {
// Add SYSPATH as the last path
Kohana::$include_paths[] = SYSPATH;
- // Clear cached include paths
- self::$internal_cache['find_file_paths'] = array();
- if ( ! isset(self::$write_cache['find_file_paths']))
- {
- // Write cache at shutdown
- self::$write_cache['find_file_paths'] = TRUE;
- }
-
+ Kohana::$include_paths_hash = md5(serialize(Kohana::$include_paths));
}
return Kohana::$include_paths;
@@ -766,8 +760,8 @@ abstract class Kohana_Core {
// Search path
$search = $directory.'/'.$filename.$ext;
- if (isset(Kohana::$internal_cache['find_file_paths'][$search]))
- return Kohana::$internal_cache['find_file_paths'][$search];
+ if (isset(Kohana::$internal_cache['find_file_paths'][Kohana::$include_paths_hash][$search]))
+ return Kohana::$internal_cache['find_file_paths'][Kohana::$include_paths_hash][$search];
// Load include paths
$paths = Kohana::$include_paths;
@@ -824,7 +818,7 @@ abstract class Kohana_Core {
Kohana::$write_cache['find_file_paths'] = TRUE;
}
- return Kohana::$internal_cache['find_file_paths'][$search] = $found;
+ return Kohana::$internal_cache['find_file_paths'][Kohana::$include_paths_hash][$search] = $found;
}
/**