浏览代码

utils::GetCSSFromSASS() : Skip processing if file is already a .css

git-svn-id: http://svn.code.sf.net/p/itop/code/trunk@4204 a333f486-631f-4898-b8df-5754b55c2be0
glajarige 9 年之前
父节点
当前提交
e87b4f7173
共有 1 个文件被更改,包括 6 次插入0 次删除
  1. 6 0
      application/utils.inc.php

+ 6 - 0
application/utils.inc.php

@@ -1207,6 +1207,12 @@ class utils
 	 */
 	static public function GetCSSFromSASS($sSassRelPath)
 	{
+		// Avoiding compilation if file is already a css file.
+		if (preg_match('/\.css$/', $sSassRelPath))
+		{
+			return $sSassRelPath;
+		}
+
 		$sSassPath = APPROOT.$sSassRelPath;
 		$sCssRelPath = preg_replace('/\.scss$/', '.css', $sSassRelPath);
 		$sCssPath = APPROOT.$sCssRelPath;