mirror of
https://github.com/mrclay/minify.git
synced 2025-08-26 15:24:48 +02:00
Makes sure all file/dir paths are normalized to prepare for comparing.
Particularly the system docRoot and currentDir values passed to the URI rewriter and the allowDirs check.
This commit is contained in:
@@ -56,6 +56,11 @@ class Minify {
|
||||
*/
|
||||
protected $controller = null;
|
||||
|
||||
/**
|
||||
* @var Minify_Env
|
||||
*/
|
||||
protected $env;
|
||||
|
||||
/**
|
||||
* @var Minify_SourceInterface[]
|
||||
*/
|
||||
@@ -218,6 +223,8 @@ class Minify {
|
||||
*/
|
||||
public function serve(Minify_ControllerInterface $controller, $options = array())
|
||||
{
|
||||
$this->env = $controller->getEnv();
|
||||
|
||||
$options = array_merge($this->getDefaultOptions(), $options);
|
||||
|
||||
$config = $controller->createConfiguration($options);
|
||||
@@ -499,7 +506,7 @@ class Minify {
|
||||
protected function setupUriRewrites()
|
||||
{
|
||||
foreach($this->sources as $key => $source) {
|
||||
$file = $source->getFilePath();
|
||||
$file = $this->env->normalizePath($source->getFilePath());
|
||||
$minifyOptions = $source->getMinifierOptions();
|
||||
|
||||
if ($file
|
||||
|
Reference in New Issue
Block a user