mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-04 01:01:41 +09:00
Additional fixes for #601
This commit is contained in:
parent
f8fb61ec6c
commit
e9df310364
3 changed files with 13 additions and 4 deletions
|
|
@ -92,7 +92,7 @@ class FrontEndFileHandler extends Handler
|
|||
if(!is_array($args))
|
||||
{
|
||||
$args = array($args);
|
||||
}
|
||||
}
|
||||
$args[0] = preg_replace(array_keys(HTMLDisplayHandler::$replacements), array_values(HTMLDisplayHandler::$replacements), $args[0]);
|
||||
$isCommon = preg_match(HTMLDisplayHandler::$reservedCSS, $args[0]) || preg_match(HTMLDisplayHandler::$reservedJS, $args[0]);
|
||||
if($args[3] > -1500000 && $isCommon)
|
||||
|
|
@ -155,7 +155,8 @@ class FrontEndFileHandler extends Handler
|
|||
return $existsInfo[$existsKey];
|
||||
}
|
||||
|
||||
$pathInfo = pathinfo($fileName);
|
||||
$pathInfo = pathinfo($fileName);
|
||||
|
||||
$file = new stdClass();
|
||||
$file->fileName = $pathInfo['basename'];
|
||||
$file->filePath = $this->_getAbsFileUrl($pathInfo['dirname']);
|
||||
|
|
@ -172,7 +173,11 @@ class FrontEndFileHandler extends Handler
|
|||
$file->fileNameNoExt = $pathInfo['filename'];
|
||||
$file->isMinified = false;
|
||||
}
|
||||
$file->isExternalURL = preg_match('@^(https?:)?//@i', $file->filePath) ? true : false;
|
||||
$file->isExternalURL = preg_match('@^(https?:)?//@i', $file->filePath) ? true : false;
|
||||
if ($file->isExternalURL && !$file->fileExtension)
|
||||
{
|
||||
$file->fileExtension = preg_match('/[\.\/](css|js)\b/', $fileName, $matches) ? $matches[1] : null;
|
||||
}
|
||||
$file->isCachedScript = !$file->isExternalURL && strpos($file->filePath, 'files/cache/') !== false;
|
||||
$file->isCommon = $isCommon;
|
||||
$file->keyName = $file->fileNameNoExt . '.' . $file->fileExtension;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue