mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-08 11:11:39 +09:00
Fix compatibility with safe_mode when saving minified scripts
This commit is contained in:
parent
7dd804ed09
commit
ff0e71a4e3
2 changed files with 4 additions and 4 deletions
|
|
@ -186,17 +186,17 @@ class FrontEndFileHandler extends Handler
|
|||
|
||||
if(!file_exists($minifiedFilePath) || filemtime($minifiedFilePath) < filemtime($originalFilePath))
|
||||
{
|
||||
FileHandler::makeDir(_XE_PATH_ . 'files/cache/minify');
|
||||
if($file->fileExtension === 'css')
|
||||
{
|
||||
$minifier = new MatthiasMullie\Minify\CSS($originalFilePath);
|
||||
$minifier->minify($minifiedFilePath);
|
||||
$content = $minifier->execute($minifiedFilePath);
|
||||
}
|
||||
else
|
||||
{
|
||||
$minifier = new MatthiasMullie\Minify\JS($originalFilePath);
|
||||
$minifier->minify($minifiedFilePath);
|
||||
$content = $minifier->execute($minifiedFilePath);
|
||||
}
|
||||
FileHandler::writeFile($minifiedFilePath, $content);
|
||||
}
|
||||
|
||||
$file->fileName = $minifiedFileHash . '.' . $minifiedFileName;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue