1
0
mirror of https://github.com/mrclay/minify.git synced 2025-08-08 07:06:49 +02:00

CSS/UriRewriter.php : fixed expansion of docRoot in symlink links

min/index.php : removed expansion (unneeded)
This commit is contained in:
Steve Clay
2009-03-06 02:43:12 +00:00
parent e5ded285c0
commit 22ee97a934
2 changed files with 2 additions and 7 deletions

View File

@@ -29,12 +29,7 @@ if ($min_documentRoot) {
Minify::setDocRoot(); // IIS may need help Minify::setDocRoot(); // IIS may need help
} }
// normalize paths in symlinks $min_serveOptions['minifierOptions']['text/css']['symlinks'] = $min_symlinks;
foreach ($min_symlinks as $link => $target) {
$link = str_replace('//', realpath($_SERVER['DOCUMENT_ROOT']), $link);
$link = strtr($link, '/', DIRECTORY_SEPARATOR);
$min_serveOptions['minifierOptions']['text/css']['symlinks'][$link] = realpath($target);
}
if ($min_allowDebugFlag && isset($_GET['debug'])) { if ($min_allowDebugFlag && isset($_GET['debug'])) {
$min_serveOptions['debug'] = true; $min_serveOptions['debug'] = true;

View File

@@ -52,7 +52,7 @@ class Minify_CSS_UriRewriter {
// normalize symlinks // normalize symlinks
foreach ($symlinks as $link => $target) { foreach ($symlinks as $link => $target) {
$link = str_replace('//', realpath(self::$_docRoot), $link); $link = str_replace('//', realpath(self::$_docRoot) . '/', $link);
$link = strtr($link, '/', DIRECTORY_SEPARATOR); $link = strtr($link, '/', DIRECTORY_SEPARATOR);
self::$_symlinks[$link] = realpath($target); self::$_symlinks[$link] = realpath($target);
} }