htmloutputter->script() special cases src's that begin with plugin/ or local/ so that plugins don't need to include common_path() in every call to $action->script()

Adjust plugins to not call common_path() when it's not necessary
Fix minify plugin
This commit is contained in:
Craig Andrews
2010-02-17 12:03:14 -05:00
parent c19300272f
commit 46e9aa13aa
10 changed files with 53 additions and 42 deletions

View File

@@ -86,7 +86,11 @@ class MinifyPlugin extends Plugin
$url = parse_url($src);
if( empty($url['scheme']) && empty($url['host']) && empty($url['query']) && empty($url['fragment']))
{
$src = $this->minifyUrl($src);
if (strpos($src, 'plugins/') === 0 || strpos($src, 'local/') === 0) {
$src = $this->minifyUrl($src);
} else {
$src = $this->minifyUrl('js/'.$src);
}
}
}