summaryrefslogtreecommitdiff
path: root/modules/gallery/helpers
diff options
context:
space:
mode:
authorChad Kieffer <ckieffer@gmail.com>2009-10-07 00:21:47 -0600
committerChad Kieffer <ckieffer@gmail.com>2009-10-07 00:21:47 -0600
commit617076e8970872ba0355caeadb70cbf6735f2a39 (patch)
treefa14e2946763449af57661882a95b752a54e05f3 /modules/gallery/helpers
parent859f8dc558555cee4c106099c1a44aa6866aaa0f (diff)
parent13fb033235a057445d58f5c2663951d1e0738423 (diff)
Merge branch 'master' of github.com:gallery/gallery3
Diffstat (limited to 'modules/gallery/helpers')
-rw-r--r--modules/gallery/helpers/gallery.php8
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)) {