Show
Ignore:
Timestamp:
02/23/2008 12:56:52 AM (9 months ago)
Author:
armen
Message:

Canged the Kohana::find_file call syntax due to r2135.
you can use Kohana::find_file for non-PHP extensions like following example:

Kohana::find_file('directory', 'filename', FALSE, 'css');

which the last arg is custom file type.

Files:
1 modified

Legend:

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

    r2143 r2152  
    706706                { 
    707707                        // Users can define their own extensions, .css, etc 
    708                         $ext = ($ext == FALSE) ? EXT : $ext; 
     708                        $ext = ($ext == FALSE) ? ltrim(EXT, '.') : $ext; 
    709709 
    710710                        // Find the file and return its filename 
    711711                        foreach (Config::include_paths() as $path) 
    712712                        { 
    713                                 if (is_file($path.$search.$ext)) 
    714                                         return $found[$hash] = $path.$search.$ext; 
     713                                if (is_file($path.$search.'.'.$ext)) 
     714                                        return $found[$hash] = $path.$search.'.'.$ext; 
    715715                        } 
    716716