summaryrefslogtreecommitdiff
path: root/modules/gallery/libraries/Gallery_View.php
diff options
context:
space:
mode:
authorTim Almdal <tnalmdal@shaw.ca>2009-10-01 12:43:30 -0700
committerTim Almdal <tnalmdal@shaw.ca>2009-10-01 12:44:18 -0700
commitb2a9bf43afa2aaf845368ea04beef56f2ed035de (patch)
tree45e4181bb38544b4d7d605cade5459ae76dc8201 /modules/gallery/libraries/Gallery_View.php
parent3ceb2775f890925f7c2251778e803f5c32811c9c (diff)
Change gallery::find_file to not assume that the absolute path is relative to the document root. Instead ignore all th path parts until one of application, modules, themes, or libs is found. Fixes ticket #827
Diffstat (limited to 'modules/gallery/libraries/Gallery_View.php')
-rw-r--r--modules/gallery/libraries/Gallery_View.php6
1 files changed, 2 insertions, 4 deletions
diff --git a/modules/gallery/libraries/Gallery_View.php b/modules/gallery/libraries/Gallery_View.php
index 253a314f..bdfd2fc9 100644
--- a/modules/gallery/libraries/Gallery_View.php
+++ b/modules/gallery/libraries/Gallery_View.php
@@ -85,13 +85,11 @@ class Gallery_View_Core extends View {
if (empty($contents)) {
$contents = "";
- $docroot_len = strlen(DOCROOT);
foreach (array_keys($paths) as $path) {
- $relative = substr($path, $docroot_len);
if ($type == "css") {
- $contents .= "/* $relative */\n" . $this->process_css($path) . "\n";
+ $contents .= "/* $path */\n" . $this->process_css($path) . "\n";
} else {
- $contents .= "/* $relative */\n" . file_get_contents($path) . "\n";
+ $contents .= "/* $path */\n" . file_get_contents($path) . "\n";
}
}