From 63f9e430240906cc7c8fb335a9cf7b904421b3e5 Mon Sep 17 00:00:00 2001 From: ovclas Date: Thu, 17 May 2012 01:03:30 +0000 Subject: [PATCH] reverse merge from 1.6.0 (r10572) git-svn-id: http://xe-core.googlecode.com/svn/branches/1.5.0@10712 201d5d3c-b55e-5fd7-737f-ddc643e51545 --- .../frontendfile/FrontEndFileHandler.class.php | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/classes/frontendfile/FrontEndFileHandler.class.php b/classes/frontendfile/FrontEndFileHandler.class.php index 506f3505e..37742c05a 100644 --- a/classes/frontendfile/FrontEndFileHandler.class.php +++ b/classes/frontendfile/FrontEndFileHandler.class.php @@ -70,6 +70,8 @@ $map = &$this->cssMap; $mapIndex = &$this->cssMapIndex; $key = $file->filePath . $file->fileName . "\t" . $file->targetIe . "\t" . $file->media; + + $this->_arrangeCssIndex($pathInfo['dirname'], $file); } else if ($file->fileExtension == 'js') { @@ -265,4 +267,18 @@ return $path; } + + private function _arrangeCssIndex($dirName, $file) + { + if($file->index !== 0) + { + return; + } + + $dirName = str_replace('./', '', $dirName); + $tmp = explode('/', $dirName); + + $cssSortList = array('common'=>-100000, 'layouts'=>-90000, 'modules'=>-80000, 'widgets'=>-70000, 'addons'=>-60000); + $file->index = $cssSortList[$tmp[0]]; + } }