mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-04-29 23:32:54 +09:00
Update unit tests to check for minification
This commit is contained in:
parent
bfaa2c170b
commit
22910608a2
2 changed files with 41 additions and 23 deletions
|
|
@ -9,6 +9,7 @@ class FrontEndFileHandler extends Handler
|
|||
{
|
||||
|
||||
static $isSSL = null;
|
||||
static $minify = null;
|
||||
|
||||
/**
|
||||
* Map for css
|
||||
|
|
@ -143,11 +144,10 @@ class FrontEndFileHandler extends Handler
|
|||
private function getFileInfo($fileName, $targetIe = '', $media = 'all')
|
||||
{
|
||||
static $existsInfo = array();
|
||||
static $autoMinify = null;
|
||||
|
||||
if($autoMinify === null)
|
||||
if(self::$minify === null)
|
||||
{
|
||||
$autoMinify = Context::getDBInfo()->minify_scripts === 'N' ? false : true;
|
||||
self::$minify = Context::getDBInfo()->minify_scripts === 'N' ? false : true;
|
||||
}
|
||||
|
||||
if(isset($existsInfo[$existsKey]))
|
||||
|
|
@ -175,7 +175,7 @@ class FrontEndFileHandler extends Handler
|
|||
$file->cdnPath = $this->_normalizeFilePath($pathInfo['dirname']);
|
||||
|
||||
// Minify file
|
||||
if($autoMinify && !$file->isMinified && strpos($file->filePath, '://') === false && strpos($file->filePath, 'common/js/plugins') === false)
|
||||
if(self::$minify && !$file->isMinified && strpos($file->filePath, '://') === false && strpos($file->filePath, 'common/js/plugins') === false)
|
||||
{
|
||||
$originalFilePath = $file->fileRealPath . '/' . $pathInfo['basename'];
|
||||
if(($file->fileExtension === 'css' || $file->fileExtension === 'js') && file_exists($originalFilePath))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue