summaryrefslogtreecommitdiff
path: root/modules/gallery/libraries/Gallery_View.php
diff options
context:
space:
mode:
Diffstat (limited to 'modules/gallery/libraries/Gallery_View.php')
-rw-r--r--modules/gallery/libraries/Gallery_View.php16
1 files changed, 8 insertions, 8 deletions
diff --git a/modules/gallery/libraries/Gallery_View.php b/modules/gallery/libraries/Gallery_View.php
index 219cc883..f3fa970b 100644
--- a/modules/gallery/libraries/Gallery_View.php
+++ b/modules/gallery/libraries/Gallery_View.php
@@ -24,12 +24,12 @@ class Gallery_View_Core extends View {
/**
* Add a script to the combined scripts list.
- * @param $file the relative path to a script from the gallery3 directory
+ * @param $file the file name or path of the script to include. if a path is specified then
+ * the location needs to be DOCROOT/lib. Just specifying a file name will result
+ * in searching the hierarchical file system.
*/
public function script($file) {
- $base_file = str_replace(".js", "", $file);
- if (($path = Kohana::find_file("js", $base_file, false, "js")) ||
- file_exists($path = DOCROOT . "lib/$file")) {
+ if (($path = gallery::find_file("js", $file, false))) {
$this->scripts[$path] = 1;
} else {
Kohana::log("error", "Can't find script file: $file");
@@ -47,12 +47,12 @@ class Gallery_View_Core extends View {
/**
* Add a css file to the combined css list.
- * @param $file the relative path to a script from the gallery3 directory
+ * @param $file the file name or path of a css file to include. if a path is specified then
+ * the location needs to be DOCROOT/lib. Just specifying a file name will result
+ * in searching the hierarchical file system.
*/
public function css($file) {
- $base_file = str_replace(".css", "", $file);
- if (($path = Kohana::find_file("css", $base_file, false, "css")) ||
- file_exists($path = DOCROOT . "lib/$file")) {
+ if (($path = gallery::find_file("css", $file, false))) {
$this->css[$path] = 1;
} else {
Kohana::log("error", "Can't find css file: $file");