From 91d4eb1148d021b0ee37f722f69422cbb264bd6e Mon Sep 17 00:00:00 2001 From: Marcel Werk Date: Thu, 30 Jun 2016 16:51:52 +0200 Subject: [PATCH] Fixed links in dynamic boxes --- wcfsetup/install/files/lib/data/box/Box.class.php | 14 ++++++++++++++ 1 file changed, 14 insertions(+) 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)); } -- 2.20.1