diff options
| author | Tim Almdal <tnalmdal@shaw.ca> | 2009-10-07 19:09:10 -0700 | 
|---|---|---|
| committer | Tim Almdal <tnalmdal@shaw.ca> | 2009-10-07 19:09:10 -0700 | 
| commit | fa2ec8825dcaeaceb4857e3880ee4eee5de5bf71 (patch) | |
| tree | d7a16477d7890932ee1ae7bb91c95dd5d7010445 /modules/gallery/helpers/gallery.php | |
| parent | e1a394b6bfb6b7c830eb353f2056d39fd8d1b0f7 (diff) | |
| parent | d71a8ef5d0d2d1ddbc450f1c5962b4c3b3a6fdcd (diff) | |
Merge branch 'master' of git@github.com:gallery/gallery3 into talmdal_dev
Diffstat (limited to 'modules/gallery/helpers/gallery.php')
| -rw-r--r-- | modules/gallery/helpers/gallery.php | 8 | 
1 files changed, 6 insertions, 2 deletions
| diff --git a/modules/gallery/helpers/gallery.php b/modules/gallery/helpers/gallery.php index 37a08d08..50e2c43b 100644 --- a/modules/gallery/helpers/gallery.php +++ b/modules/gallery/helpers/gallery.php @@ -92,8 +92,12 @@ class gallery_Core {    static function find_file($directory, $file, $required=false) {      $file_name = substr($file, 0, -strlen($ext = strrchr($file, '.')));      $file_name = Kohana::find_file($directory, $file_name, $required, substr($ext, 1)); -    if (!$file_name && file_exists(DOCROOT . "lib/$file")) { -      return "lib/$file"; +    if (!$file_name) { +      if (file_exists(DOCROOT . "lib/$directory/$file")) { +        return "lib/$directory/$file"; +      } else if (file_exists(DOCROOT . "lib/$file")) { +        return "lib/$file"; +      }      }      if (is_string($file_name)) { | 
