瀏覽代碼

Make sure that the stylesheet can be loaded by the setup page at first run.

git-svn-id: http://svn.code.sf.net/p/itop/code/trunk@3644 a333f486-631f-4898-b8df-5754b55c2be0
dflaven 10 年之前
父節點
當前提交
ad15879878
共有 1 個文件被更改,包括 7 次插入1 次删除
  1. 7 1
      application/webpage.class.inc.php

+ 7 - 1
application/webpage.class.inc.php

@@ -286,7 +286,13 @@ class WebPage implements Page
     			file_put_contents($sCssPath, $sCss);
     			file_put_contents($sCssPath, $sCss);
     		}
     		}
     	}
     	}
-    	$sCSSUrl = utils::GetAbsoluteUrlAppRoot().$sCssRelPath;
+    	$sRootUrl =  utils::GetAbsoluteUrlAppRoot();
+    	if ($sRootUrl === '')
+    	{
+    		// We're running the setup of the first install...
+    		$sRootUrl = '../';
+    	}
+    	$sCSSUrl = $sRootUrl.$sCssRelPath;
     	$this->add_linked_stylesheet($sCSSUrl);
     	$this->add_linked_stylesheet($sCSSUrl);
     }
     }
 	/**
 	/**