mirror of
https://github.com/Pathduck/gallery3.git
synced 2026-05-20 03:19:13 -04:00
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
This commit is contained in:
@@ -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";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user