Permalink
Browse files

revert changes

  • Loading branch information...
2 parents e07b5a8 + fe81dbc commit f21049f97cd335963457d6279a8855d3c2d30bf2 @acidvertigo committed Dec 7, 2011
Showing with 13 additions and 1 deletion.
  1. +0 −1 min/lib/Minify.php
  2. +13 −0 min/lib/Minify/ImportProcessor.php
View
1 min/lib/Minify.php
@@ -263,7 +263,6 @@ public static function serve($controller, $options = array())
if (self::$_options['contentType'] === self::TYPE_CSS
&& self::$_options['rewriteCssUris']) {
- reset($controller->sources);
foreach($controller->sources as $key => $source) {
if ($source->filepath
&& !isset($source->minifyOptions['currentDir'])
View
13 min/lib/Minify/ImportProcessor.php
@@ -150,8 +150,21 @@ private function _urlCB($m)
// prepend path with current dir separator (OS-independent)
$path = $this->_currentDir
. DIRECTORY_SEPARATOR . strtr($url, '/', DIRECTORY_SEPARATOR);
+<<<<<<< HEAD
// update the relative path by the directory of the file that imported this one
$url = self::getPathDiff(realpath($this->_previewsDir), $path);
+=======
+ // strip doc root
+ $path = substr($path, strlen(realpath($_SERVER['DOCUMENT_ROOT'])));
+ // fix to absolute URL
+ $url = strtr($path, '/\\', '//');
+ // remove /./ and /../ where possible
+ $url = str_replace('/./', '/', $url);
+ // inspired by patch from Oleg Cherniy
+ do {
+ $url = preg_replace('@/(?!\\.\\.?)[^/]+/\\.\\.@', '/', $url, 1, $changed);
+ } while ($changed);
+>>>>>>> origin/patch-1
}
}
return "url({$quote}{$url}{$quote})";

0 comments on commit f21049f

Please sign in to comment.