Skip to content

Commit

Permalink
Extending 8d6f80e to add some compatibility fixes and updated variabl…
Browse files Browse the repository at this point in the history
…e names/comments for clarity
  • Loading branch information
Woody Gilk committed Apr 4, 2010
1 parent 8d6f80e commit a6b8821
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions classes/kohana/core.php
Original file line number Diff line number Diff line change
Expand Up @@ -522,11 +522,11 @@ public static function include_paths()
* @param string directory name (views, i18n, classes, extensions, etc.)
* @param string filename with subdirectory
* @param string extension to search for
* @param boolean flag that determines the return type
* @return array file list from the directory
* @param boolean return an array of files?
* @return array a list of files when $array is TRUE
* @return string single file path
*/
public static function find_file($dir, $file, $ext = NULL, $aggregate_files = FALSE)
public static function find_file($dir, $file, $ext = NULL, $array = FALSE)
{
// Use the defined extension by default
$ext = ($ext === NULL) ? EXT : '.'.$ext;
Expand All @@ -546,7 +546,7 @@ public static function find_file($dir, $file, $ext = NULL, $aggregate_files = FA
$benchmark = Profiler::start('Kohana', __FUNCTION__);
}

if ($aggregate_files OR $dir === 'config' OR $dir === 'i18n' OR $dir === 'messages')
if ($array OR $dir === 'config' OR $dir === 'i18n' OR $dir === 'messages')
{
// Include paths must be searched in reverse
$paths = array_reverse(Kohana::$_paths);
Expand Down
2 changes: 1 addition & 1 deletion classes/kohana/i18n.php
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ public static function load($lang)
// Create a path for this set of parts
$path = implode(DIRECTORY_SEPARATOR, $parts);

if ($files = Kohana::find_file('i18n', $path))
if ($files = Kohana::find_file('i18n', $path, NULL, TRUE))
{
$t = array();
foreach ($files as $file)
Expand Down

0 comments on commit a6b8821

Please sign in to comment.