From: Matthias Schmidt Date: Sun, 19 May 2013 10:22:29 +0000 (+0200) Subject: Makes it possible to use template scripting in page menu items X-Git-Tag: 2.0.0_Beta_1~155 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=cf8e3e2f79202119c06de87db65fbae617e575b9;p=GitHub%2FWoltLab%2FWCF.git Makes it possible to use template scripting in page menu items This is helpful if the language item has different values based on option settings, e.g. if a certain part of the language item is only visible if a related option is enabled. --- diff --git a/wcfsetup/install/files/lib/data/page/menu/item/PageMenuItem.class.php b/wcfsetup/install/files/lib/data/page/menu/item/PageMenuItem.class.php index ec4b6fdf6d..1a59563dd4 100644 --- a/wcfsetup/install/files/lib/data/page/menu/item/PageMenuItem.class.php +++ b/wcfsetup/install/files/lib/data/page/menu/item/PageMenuItem.class.php @@ -144,7 +144,7 @@ class PageMenuItem extends ProcessibleDatabaseObject implements ITreeMenuItem { protected function parseController() { if ($this->controller === null) { $this->controller = ''; - + // resolve application and controller if ($this->menuItemController) { $parts = explode('\\', $this->menuItemController); @@ -163,6 +163,6 @@ class PageMenuItem extends ProcessibleDatabaseObject implements ITreeMenuItem { * @return string */ public function __toString() { - return WCF::getLanguage()->get($this->menuItem); + return WCF::getLanguage()->getDynamicVariable($this->menuItem); } }