Fix base_uri calculation when using site root

This commit is contained in:
2011-12-30 13:11:46 +00:00
parent 671b87a211
commit 830ab78a45

View File

@@ -23,7 +23,8 @@ class SihnonFramework_Main {
protected $base_uri;
protected function __construct() {
$this->base_uri = dirname($_SERVER['SCRIPT_NAME']) . '/';
$dirname = dirname($_SERVER['SCRIPT_NAME']);
$this->base_uri = $dirname == '/' ? '/' : $dirname . '/';
}
protected function init() {