From ebab6814423268fd3623ff4916cb23d8c85afc43 Mon Sep 17 00:00:00 2001 From: Matthias Schmidt Date: Fri, 25 Aug 2017 07:44:17 +0200 Subject: [PATCH] Convert article links during html processing in ACP --- com.woltlab.wcf/eventListener.xml | 6 ++++++ .../ArticleLinkHtmlInputNodeProcessorListener.class.php | 4 +++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/com.woltlab.wcf/eventListener.xml b/com.woltlab.wcf/eventListener.xml index f09ad68d93..34be21dee6 100644 --- a/com.woltlab.wcf/eventListener.xml +++ b/com.woltlab.wcf/eventListener.xml @@ -28,6 +28,12 @@ afterProcess wcf\system\event\listener\ArticleLinkHtmlInputNodeProcessorListener + + wcf\system\html\input\node\HtmlInputNodeProcessor + afterProcess + wcf\system\event\listener\ArticleLinkHtmlInputNodeProcessorListener + admin + diff --git a/wcfsetup/install/files/lib/system/event/listener/ArticleLinkHtmlInputNodeProcessorListener.class.php b/wcfsetup/install/files/lib/system/event/listener/ArticleLinkHtmlInputNodeProcessorListener.class.php index d9cbbb06e4..06e16d7505 100644 --- a/wcfsetup/install/files/lib/system/event/listener/ArticleLinkHtmlInputNodeProcessorListener.class.php +++ b/wcfsetup/install/files/lib/system/event/listener/ArticleLinkHtmlInputNodeProcessorListener.class.php @@ -21,7 +21,9 @@ class ArticleLinkHtmlInputNodeProcessorListener extends AbstractHtmlInputNodePro public function execute($eventObj, $className, $eventName, array &$parameters) { /** @var HtmlInputNodeProcessor $eventObj */ - $regex = $this->getRegexFromLink(LinkHandler::getInstance()->getLink('Article')); + $regex = $this->getRegexFromLink(LinkHandler::getInstance()->getLink('Article', [ + 'forceFrontend' => true + ])); $articleContentIDs = $this->getObjectIDs($eventObj, $regex); if (!empty($articleContentIDs)) { -- 2.20.1