From: Alexander Ebert Date: Wed, 12 Oct 2011 17:09:32 +0000 (+0200) Subject: base-href is not set on runtime X-Git-Tag: 2.0.0_Beta_1~1701 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=782f3fea0eb5322193dbcf16c410f90422c64cae;p=GitHub%2FWoltLab%2FWCF.git base-href is not set on runtime --- diff --git a/wcfsetup/install/files/acp/templates/header.tpl b/wcfsetup/install/files/acp/templates/header.tpl index f062abc097..881bafa104 100644 --- a/wcfsetup/install/files/acp/templates/header.tpl +++ b/wcfsetup/install/files/acp/templates/header.tpl @@ -1,6 +1,7 @@ + {if $pageTitle|isset}{@$pageTitle}{else}{lang}wcf.global.pageTitle{/lang}{/if} - {lang}wcf.acp{/lang} diff --git a/wcfsetup/install/files/lib/system/WCFACP.class.php b/wcfsetup/install/files/lib/system/WCFACP.class.php index 938b2d627b..a2dbd8df47 100644 --- a/wcfsetup/install/files/lib/system/WCFACP.class.php +++ b/wcfsetup/install/files/lib/system/WCFACP.class.php @@ -85,7 +85,19 @@ class WCFACP extends WCF { protected function assignDefaultTemplateVariables() { parent::assignDefaultTemplateVariables(); + // base tag is determined on runtime + $phpSelf = $_SERVER['PHP_SELF']; + if (isset($_SERVER['PATH_INFO'])) { + // strip path info + $phpSelf = str_replace($_SERVER['PATH_INFO'], '', $phpSelf); + } + if (($pos = strpos($phpSelf, 'index.php')) !== false) { + // strip index.php + $phpSelf = substr($phpSelf, 0, $pos); + } + self::getTPL()->assign(array( + 'baseHref' => $phpSelf, 'quickAccessPackages' => $this->getQuickAccessPackages(), //'timezone' => util\DateUtil::getTimezone() ));