From 48e5af8d739f69e5891d072fab98240641c2640c Mon Sep 17 00:00:00 2001 From: Tim Almdal Date: Sat, 21 Nov 2009 09:28:30 -0800 Subject: [PATCH] Don't use realpath when calculating the relative paths of embedded references in css files. This fixes ticket #910 --- modules/gallery/libraries/Gallery_View.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/gallery/libraries/Gallery_View.php b/modules/gallery/libraries/Gallery_View.php index bdfd2fc929..3bf56d0f87 100644 --- a/modules/gallery/libraries/Gallery_View.php +++ b/modules/gallery/libraries/Gallery_View.php @@ -125,7 +125,7 @@ private function process_css($css_file) { if (preg_match_all($PATTERN, $css, $matches, PREG_SET_ORDER)) { $search = $replace = array(); foreach ($matches as $match) { - $relative = substr(realpath(dirname($css_file) . "/$match[1]"), $docroot_length); + $relative = dirname($css_file) . "/$match[1]"; if (!empty($relative)) { $search[] = $match[0]; $replace[] = "url('" . url::abs_file($relative) . "')";