/// \internal actually initializes $basevars
public static function initPriv(){
- global $basevars,$_SERVER,$BaseUrl;
+ global $basevars,$_SERVER,$BaseUrl,$BaseUrlDir;
self::initBaseUrlPriv();
//basic variables shared by all templates
// script URLs
$basevars['script']['root']=$BaseUrl;
$basevars['script']['this']=$BaseUrl;
+ $basevars['script']['basedir']=$BaseUrlDir;
if(isset($_SERVER['QUERY_STRING']) && $_SERVER['QUERY_STRING']!="")
$basevars['script']['this'].="?".$_SERVER['QUERY_STRING'];
$basevars['script']['index']=$BaseUrl."?mode=index";
}
private static function initBaseUrlPriv(){
- global $BaseUrl,$_SERVER;
+ global $BaseUrl,$_SERVER,$BaseUrlDir;
//check whether it is already set
if(!isset($BaseUrl))$BaseUrl="";
if($BaseUrl!="")return;
if($p=="")continue;
$path.="/".$p;
}
+ $BaseUrlDir=$BaseUrl.$path;
$pl=explode(".",$last);
if(count($pl)!=2)$path.="/".$last;
else $path.="/index.".$pl[1];