Show
Ignore:
Timestamp:
03/15/2008 09:35:43 AM (10 months ago)
Author:
armen
Message:

Added a parameter to control over cache.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/system/core/Kohana.php

    r2292 r2306  
    676676         * @param   boolean  is the file required? 
    677677         * @param   boolean  use custom file extension? 
     678         * @param   boolean  use cache 
    678679         * @return  array    if the type is i18n or config 
    679680         * @return  string   if the file is found 
    680681         * @return  FALSE    if the file is not found 
    681682         */ 
    682         public static function find_file($directory, $filename, $required = FALSE, $ext = FALSE) 
     683        public static function find_file($directory, $filename, $required = FALSE, $ext = FALSE, $use_cache = TRUE) 
    683684        { 
    684685                static $found = array(); 
     
    687688                $hash   = sha1($search.$ext); 
    688689 
    689                 if (isset($found[$hash])) 
     690                if ($use_cache AND isset($found[$hash])) 
    690691                        return $found[$hash]; 
    691692