diff --git a/com.woltlab.wcf/templates/contentNotVisible.tpl b/com.woltlab.wcf/templates/shared_contentNotVisible.tpl similarity index 100% rename from com.woltlab.wcf/templates/contentNotVisible.tpl rename to com.woltlab.wcf/templates/shared_contentNotVisible.tpl diff --git a/wcfsetup/install/files/lib/system/WCF.class.php b/wcfsetup/install/files/lib/system/WCF.class.php index db88ffb24cd..d24d5810207 100644 --- a/wcfsetup/install/files/lib/system/WCF.class.php +++ b/wcfsetup/install/files/lib/system/WCF.class.php @@ -650,8 +650,10 @@ protected function loadApplication(Application $application, bool $isDependentAp throw new SystemException('Unable to load configuration for ' . $package->package); } - // register template path if not within ACP - if (!\class_exists('wcf\system\WCFACP', false)) { + if (\class_exists('wcf\system\WCFACP', false)) { + // In acp we need to load the application and path into TemplateEngine + TemplateEngine::getInstance()->addApplication($abbreviation, $packageDir . 'templates/'); + } else { // add template path and abbreviation static::getTPL()->addApplication($abbreviation, $packageDir . 'templates/'); } diff --git a/wcfsetup/install/files/lib/system/bbcode/AttachmentBBCode.class.php b/wcfsetup/install/files/lib/system/bbcode/AttachmentBBCode.class.php index 8c120dc846e..f8ed9bcbae5 100644 --- a/wcfsetup/install/files/lib/system/bbcode/AttachmentBBCode.class.php +++ b/wcfsetup/install/files/lib/system/bbcode/AttachmentBBCode.class.php @@ -27,7 +27,7 @@ public function getParsedTag(array $openingTag, $content, array $closingTag, BBC $attachment = $this->getAttachment($attachmentID); if ($attachment === null) { - return WCF::getTPL()->fetch('contentNotVisible'); + return WCF::getTPL()->fetch('shared_contentNotVisible'); } $outputType = $parser->getOutputType(); @@ -55,7 +55,7 @@ public function getParsedTag(array $openingTag, $content, array $closingTag, BBC } elseif (\substr($attachment->fileType, 0, 6) === 'audio/' && $outputType == 'text/html') { return $this->showAudioPlayer($attachment); } elseif (!$attachment->canDownload()) { - return WCF::getTPL()->fetch('contentNotVisible', 'wcf', [ + return WCF::getTPL()->fetch('shared_contentNotVisible', 'wcf', [ 'message' => WCF::getLanguage()->getDynamicVariable('wcf.message.content.no.permission.title') ], true); } diff --git a/wcfsetup/install/files/lib/system/bbcode/WoltLabSuiteArticleBBCode.class.php b/wcfsetup/install/files/lib/system/bbcode/WoltLabSuiteArticleBBCode.class.php index 003f9769fce..9fe0c499acc 100644 --- a/wcfsetup/install/files/lib/system/bbcode/WoltLabSuiteArticleBBCode.class.php +++ b/wcfsetup/install/files/lib/system/bbcode/WoltLabSuiteArticleBBCode.class.php @@ -32,11 +32,11 @@ public function getParsedTag(array $openingTag, $content, array $closingTag, BBC $article = $this->getArticle($articleID); if ($article === null) { - return WCF::getTPL()->fetch('contentNotVisible'); + return WCF::getTPL()->fetch('shared_contentNotVisible'); } if (!$article->canRead()) { - return WCF::getTPL()->fetch('contentNotVisible', 'wcf', [ + return WCF::getTPL()->fetch('shared_contentNotVisible', 'wcf', [ 'message' => WCF::getLanguage()->getDynamicVariable('wcf.message.content.no.permission.title') ], true); } elseif ($parser->getOutputType() == 'text/html') { diff --git a/wcfsetup/install/files/lib/system/bbcode/WoltLabSuiteMediaBBCode.class.php b/wcfsetup/install/files/lib/system/bbcode/WoltLabSuiteMediaBBCode.class.php index b1ce57c908d..45cbf8d8794 100644 --- a/wcfsetup/install/files/lib/system/bbcode/WoltLabSuiteMediaBBCode.class.php +++ b/wcfsetup/install/files/lib/system/bbcode/WoltLabSuiteMediaBBCode.class.php @@ -48,7 +48,7 @@ public function getParsedTag(array $openingTag, $content, array $closingTag, BBC /** @var ViewableMedia $media */ $media = MessageEmbeddedObjectManager::getInstance()->getObject('com.woltlab.wcf.media', $mediaID); if ($media === null) { - return WCF::getTPL()->fetch('contentNotVisible'); + return WCF::getTPL()->fetch('shared_contentNotVisible'); } if ($media->isAccessible()) { @@ -95,7 +95,7 @@ public function getParsedTag(array $openingTag, $content, array $closingTag, BBC return StringUtil::encodeHTML($this->getLink($media)); } else { - return WCF::getTPL()->fetch('contentNotVisible', 'wcf', [ + return WCF::getTPL()->fetch('shared_contentNotVisible', 'wcf', [ 'message' => WCF::getLanguage()->getDynamicVariable('wcf.message.content.no.permission.title') ], true); } diff --git a/wcfsetup/install/files/lib/system/bbcode/WoltLabSuitePageBBCode.class.php b/wcfsetup/install/files/lib/system/bbcode/WoltLabSuitePageBBCode.class.php index 717ec5d1222..4284b494482 100644 --- a/wcfsetup/install/files/lib/system/bbcode/WoltLabSuitePageBBCode.class.php +++ b/wcfsetup/install/files/lib/system/bbcode/WoltLabSuitePageBBCode.class.php @@ -35,6 +35,6 @@ public function getParsedTag(array $openingTag, $content, array $closingTag, BBC return StringUtil::getAnchorTag($page->getLink(), $title ?: $page->getTitle()); } - return WCF::getTPL()->fetch('contentNotVisible'); + return WCF::getTPL()->fetch('shared_contentNotVisible'); } }