From: Marcel Werk Date: Thu, 30 Jun 2016 14:51:52 +0000 (+0200) Subject: Fixed links in dynamic boxes X-Git-Tag: 3.0.0_Beta_1~1301 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=91d4eb1148d021b0ee37f722f69422cbb264bd6e;p=GitHub%2FWoltLab%2FWCF.git Fixed links in dynamic boxes --- diff --git a/wcfsetup/install/files/lib/data/box/Box.class.php b/wcfsetup/install/files/lib/data/box/Box.class.php index 66f3cc5688..f1f1cace40 100644 --- a/wcfsetup/install/files/lib/data/box/Box.class.php +++ b/wcfsetup/install/files/lib/data/box/Box.class.php @@ -380,6 +380,13 @@ class Box extends DatabaseObject { * @return string */ public function getLink() { + if ($this->boxType == 'system') { + return $this->getController()->getLink(); + } + else if ($this->boxType == 'menu') { + return ''; + } + if ($this->linkPageObjectID) { $handler = $this->getLinkPageHandler(); if ($handler && $handler instanceof ILookupPageHandler) { @@ -401,6 +408,13 @@ class Box extends DatabaseObject { * @return boolean */ public function hasLink() { + if ($this->boxType == 'system') { + return $this->getController()->hasLink(); + } + else if ($this->boxType == 'menu') { + return false; + } + return ($this->linkPageID || !empty($this->externalURL)); }