Skip to content

Commit

Permalink
fix possible template bug
Browse files Browse the repository at this point in the history
  • Loading branch information
Hanashi committed Sep 4, 2024
1 parent 6f0b909 commit f393c9f
Show file tree
Hide file tree
Showing 7 changed files with 12 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ public function __invoke(ServerRequestInterface $request, array $variables): Res
$questionIDs = $this->getQuestionsIDs($parameters->query);

return new JsonResponse([
'template' => WCF::getTPL()->fetch('faqQuestionSearchResult', 'wcf', [
'template' => WCF::getTPL()->fetch('shared_faqQuestionSearchResult', 'wcf', [
'questions' => $this->getQuestions($questionIDs),
]),
]);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ final class RenderSearch implements IController
public function __invoke(ServerRequestInterface $request, array $variables): ResponseInterface
{
return new JsonResponse([
'template' => WCF::getTPL()->fetch('faqQuestionSearchDialog', 'wcf'),
'template' => WCF::getTPL()->fetch('shared_faqQuestionSearchDialog', 'wcf'),
]);
}
}
6 changes: 4 additions & 2 deletions package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
<packagename language="de">Simple FAQ</packagename>
<packagedescription>A simple and powerful FAQ for your WSC.</packagedescription>
<packagedescription language="de">Ein simples und leistungsstarkes FAQ für Ihr WSC.</packagedescription>
<version>2.2.1</version>
<date>2024-08-31</date>
<version>2.2.1 dev 1</version>
<date>2024-09-04</date>
</packageinformation>
<authorinformation>
<author>Hanashi Development, Titus Kirch</author>
Expand Down Expand Up @@ -37,6 +37,8 @@
<instruction type="database" run="standalone">acp/database/install_dev.tkirch.wsc.faq.php</instruction>
</instructions>
<instructions type="update" fromversion="2.2.0">
<instruction type="file"/>
<instruction type="template"/>
<instruction type="templateListener"/>
</instructions>
<instructions type="update" fromversion="2.1.*">
Expand Down
6 changes: 6 additions & 0 deletions templateListener.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,12 @@
<eventname>wysiwyg</eventname>
<templatecode><![CDATA[{include file='__faqWysiwygJavaScript'}]]></templatecode>
</templatelistener>
<templatelistener name="faqWysiwygBeforeEditorJavaScriptAdmin">
<environment>admin</environment>
<templatename>shared_wysiwyg</templatename>
<eventname>wysiwyg</eventname>
<templatecode><![CDATA[{include file='shared_faqWysiwygJavaScript'}]]></templatecode>
</templatelistener>
<templatelistener name="searchAreaFaqSettings">
<environment>user</environment>
<templatename>pageHeaderSearch</templatename>
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit f393c9f

Please sign in to comment.