forked from GNUsocial/gnu-social
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:
@@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user