mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-03 16:51:40 +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
|
|
@ -460,7 +460,7 @@ class HTMLDisplayHandler
|
|||
$buffer .= file_get_contents(_XE_PATH_ . 'common/js/' . $filename) . "\n";
|
||||
}
|
||||
$minifier = new MatthiasMullie\Minify\JS($buffer);
|
||||
FileHandler::writeFile(_XE_PATH_ . $concat_target_filename, $minifier->minify());
|
||||
FileHandler::writeFile(_XE_PATH_ . $concat_target_filename, $minifier->execute());
|
||||
$oContext->loadFile(array('./' . $concat_target_filename, 'head', '', -100000), true);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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