CC-2184: Hardcoded CSS path should be relative path instead

-Make '/' the default root
This commit is contained in:
Martin Konecny 2013-01-14 16:00:38 -05:00
parent ba66746a00
commit fae3f3a03f
38 changed files with 303 additions and 298 deletions

View file

@ -66,8 +66,15 @@ class Application_Common_OsPath{
public static function getBaseDir() {
$baseUrl = dirname($_SERVER['SCRIPT_NAME']);
if (strcmp($baseUrl, '/') ==0) $baseUrl = "";
if ($baseUrl[0] != "/") {
$baseUrl = "/".$baseUrl;
}
if ($baseUrl[strlen($baseUrl) -1] != "/") {
$baseUrl = $baseUrl."/";
}
return $baseUrl;
}
}