mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-09 03:32:00 +09:00
issue 2140, Do not load duplicated front-end file(have .min, no .min in filename)
git-svn-id: http://xe-core.googlecode.com/svn/branches/luminous@11270 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
9245557873
commit
c4285ba2ed
1 changed files with 18 additions and 2 deletions
|
|
@ -99,7 +99,23 @@
|
||||||
$pathInfo = pathinfo($args[0]);
|
$pathInfo = pathinfo($args[0]);
|
||||||
$file->fileName = $pathInfo['basename'];
|
$file->fileName = $pathInfo['basename'];
|
||||||
$file->filePath = $this->_getAbsFileUrl($pathInfo['dirname']);
|
$file->filePath = $this->_getAbsFileUrl($pathInfo['dirname']);
|
||||||
|
$file->fileRealPath = FileHandler::getRealPath($pathInfo['dirname']);
|
||||||
$file->fileExtension = strtolower($pathInfo['extension']);
|
$file->fileExtension = strtolower($pathInfo['extension']);
|
||||||
|
$file->fileNameNoExt = preg_replace("/\.{$file->fileExtension}$/", '', $file->fileName);
|
||||||
|
|
||||||
|
// Remove .min
|
||||||
|
$file->fileNameNoExt = preg_replace("/\.min$/", '', $file->fileNameNoExt);
|
||||||
|
$file->fileName = $file->keyName = "{$file->fileNameNoExt}.{$file->fileExtension}";
|
||||||
|
|
||||||
|
// if no debug mode load minified file
|
||||||
|
if(!__DEBUG__)
|
||||||
|
{
|
||||||
|
$tmp = "{$file->fileNameNoExt}.min.{$file->fileExtension}";
|
||||||
|
if(file_exists("{$file->fileRealPath}/{$tmp}"))
|
||||||
|
{
|
||||||
|
$file->fileName = $tmp;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (strpos($file->filePath, '://') == false)
|
if (strpos($file->filePath, '://') == false)
|
||||||
{
|
{
|
||||||
|
|
@ -121,7 +137,7 @@
|
||||||
if (!$file->media) $file->media = 'all';
|
if (!$file->media) $file->media = 'all';
|
||||||
$map = &$this->cssMap;
|
$map = &$this->cssMap;
|
||||||
$mapIndex = &$this->cssMapIndex;
|
$mapIndex = &$this->cssMapIndex;
|
||||||
$key = $file->filePath . $file->fileName . "\t" . $file->targetIe . "\t" . $file->media;
|
$key = $file->filePath . $file->keyName . "\t" . $file->targetIe . "\t" . $file->media;
|
||||||
|
|
||||||
$this->_arrangeCssIndex($pathInfo['dirname'], $file);
|
$this->_arrangeCssIndex($pathInfo['dirname'], $file);
|
||||||
}
|
}
|
||||||
|
|
@ -138,7 +154,7 @@
|
||||||
$map = &$this->jsHeadMap;
|
$map = &$this->jsHeadMap;
|
||||||
$mapIndex = &$this->jsHeadMapIndex;
|
$mapIndex = &$this->jsHeadMapIndex;
|
||||||
}
|
}
|
||||||
$key = $file->filePath . $file->fileName . "\t" . $file->targetIe;
|
$key = $file->filePath . $file->keyName . "\t" . $file->targetIe;
|
||||||
}
|
}
|
||||||
|
|
||||||
(is_null($file->index))?$file->index=0:$file->index=$file->index;
|
(is_null($file->index))?$file->index=0:$file->index=$file->index;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue