mirror of
https://github.com/mrclay/minify.git
synced 2025-08-25 15:00:47 +02:00
Rewrite relative URIs in CSS by default (adjusted test accordingly)
Minify.php: + 'rewriteCssUris' option Controller/Base.php: + 'rewriteCssUris' default value Controller/Version1.php: moved rewriting to serve() Minify/CSS.php: renamed option 'currentPath' to 'currentDir' Minify/Source.php: made $filepath public
This commit is contained in:
@@ -48,7 +48,8 @@ abstract class Minify_Controller_Base {
|
||||
,'encodeLevel' => 9
|
||||
,'minifierOptions' => array() // no minifier options
|
||||
,'contentTypeCharset' => 'UTF-8'
|
||||
,'maxAge' => 1800 // 30 minutes
|
||||
,'maxAge' => 1800 // 30 minutes
|
||||
,'rewriteCssUris' => true
|
||||
,'quiet' => false // serve() will send headers and output
|
||||
,'debug' => false
|
||||
|
||||
|
@@ -84,9 +84,6 @@ class Minify_Controller_Version1 extends Minify_Controller_Base {
|
||||
$srcOptions = array(
|
||||
'filepath' => $file
|
||||
);
|
||||
if ('css' === $extension && MINIFY_REWRITE_CSS_URLS) {
|
||||
$srcOptions['minifyOptions']['currentPath'] = dirname($file);
|
||||
}
|
||||
$this->sources[] = new Minify_Source($srcOptions);
|
||||
} else {
|
||||
$hasBadSource = true;
|
||||
@@ -95,6 +92,9 @@ class Minify_Controller_Version1 extends Minify_Controller_Base {
|
||||
}
|
||||
if ($hasBadSource) {
|
||||
$this->sources = array();
|
||||
}
|
||||
if (! MINIFY_REWRITE_CSS_URLS) {
|
||||
$options['rewriteCssUris'] = false;
|
||||
}
|
||||
return $options;
|
||||
}
|
||||
|
Reference in New Issue
Block a user