Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 13 additions & 13 deletions files/lib/data/faq/QuestionEditor.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,11 @@ public function updateShowOrder(int $showOrder): int

//check showOrder
if ($showOrder < $this->showOrder) {
$sql = "UPDATE " . static::getDatabaseTableName() . "
SET showOrder = showOrder + 1
WHERE showOrder >= ?
AND showOrder < ?";
$statement = WCF::getDB()->prepareStatement($sql);
$sql = "UPDATE wcf1_faq_questions
SET showOrder = showOrder + 1
WHERE showOrder >= ?
AND showOrder < ?";
$statement = WCF::getDB()->prepare($sql);
$statement->execute([
$showOrder,
$this->showOrder,
Expand All @@ -56,11 +56,11 @@ public function updateShowOrder(int $showOrder): int
}

//update databse
$sql = "UPDATE " . static::getDatabaseTableName() . "
SET showOrder = showOrder - 1
WHERE showOrder <= ?
AND showOrder > ?";
$statement = WCF::getDB()->prepareStatement($sql);
$sql = "UPDATE wcf1_faq_questions
SET showOrder = showOrder - 1
WHERE showOrder <= ?
AND showOrder > ?";
$statement = WCF::getDB()->prepare($sql);
$statement->execute([
$showOrder,
$this->showOrder,
Expand All @@ -76,9 +76,9 @@ public function updateShowOrder(int $showOrder): int
*/
public static function getShowOrder(): int
{
$sql = "SELECT MAX(showOrder) AS showOrder
FROM " . static::getDatabaseTableName();
$statement = WCF::getDB()->prepareStatement($sql);
$sql = "SELECT MAX(showOrder) AS showOrder
FROM wcf1_faq_questions";
$statement = WCF::getDB()->prepare($sql);
$statement->execute();
$row = $statement->fetchArray();

Expand Down
2 changes: 1 addition & 1 deletion files/lib/page/FaqQuestionListPage.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ public function readParameters()
EOT
);

$this->category = FaqCategory::getCategory($queryParameters['id']);
$this->category = FaqCategory::getCategory((int)$queryParameters['id']);
} catch (MappingError) {
throw new IllegalLinkException();
}
Expand Down
2 changes: 1 addition & 1 deletion files/lib/system/bbcode/FaqBBCode.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ public function getParsedTag(array $openingTag, $content, array $closingTag, BBC
$collapse = true;
}

return WCF::getTPL()->fetch('faqBBCode', 'wcf', [
return WCF::getTPL()->render('wcf', 'faqBBCode', [
'question' => $question,
'collapseQuestion' => $collapse,
], true);
Expand Down
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('shared_faqQuestionSearchResult', 'wcf', [
'template' => WCF::getTPL()->render('wcf', 'shared_faqQuestionSearchResult', [
'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('shared_faqQuestionSearchDialog', 'wcf'),
'template' => WCF::getTPL()->render('wcf', 'shared_faqQuestionSearchDialog', []),
]);
}
}
11 changes: 6 additions & 5 deletions package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,18 @@
<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.8</version>
<version>2.3.0</version>
<date>2025-07-03</date>
</packageinformation>
<authorinformation>
<author>Hanashi Development, Titus Kirch</author>
<authorurl>https://hanashi.dev</authorurl>
</authorinformation>
<requiredpackages>
<requiredpackage minversion="6.1.3">com.woltlab.wcf</requiredpackage>
<requiredpackage minversion="6.2.0 dev 1">com.woltlab.wcf</requiredpackage>
</requiredpackages>
<excludedpackages>
<excludedpackage version="6.2.0 Alpha 1">com.woltlab.wcf</excludedpackage>
<excludedpackage version="6.3.0 Alpha 1">com.woltlab.wcf</excludedpackage>
</excludedpackages>
<instructions type="install">
<instruction type="file"/>
Expand All @@ -36,8 +36,9 @@
<instruction type="templateListener"/>
<instruction type="database" run="standalone">acp/database/install_dev.tkirch.wsc.faq.php</instruction>
</instructions>
<instructions type="update" fromversion="2.2.7">
<instructions type="update" fromversion="2.2.*">
<instruction type="file"/>
<instruction type="templateListener"/>
<instruction type="acpTemplate"/>
<instruction type="template"/>
</instructions>
</package>