Skip to content

Commit

Permalink
fix edit bug
Browse files Browse the repository at this point in the history
  • Loading branch information
Hanashi committed Aug 10, 2024
1 parent 81d160f commit 9c0452c
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 3 deletions.
10 changes: 10 additions & 0 deletions files/lib/acp/form/FaqQuestionAddForm.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
use wcf\data\faq\category\FaqCategoryNodeTree;
use wcf\data\faq\QuestionAction;
use wcf\data\faq\QuestionEditor;
use wcf\data\IStorableObject;
use wcf\form\AbstractFormBuilderForm;
use wcf\system\exception\NamedUserException;
use wcf\system\form\builder\container\FormContainer;
Expand Down Expand Up @@ -59,6 +60,8 @@ class FaqQuestionAddForm extends AbstractFormBuilderForm

protected $isMultilingual = 0;

protected $multiLingualAnswers = [];

/**
* @inheritDoc
*/
Expand Down Expand Up @@ -198,6 +201,13 @@ static function (IFormDocument $document, array $parameters) {
}

return $parameters;
},
function (IFormDocument $document, array $data, IStorableObject $object) {
foreach ($this->multiLingualAnswers as $languageID => $answer) {
$data['answer_i18n_' . $languageID] = $answer;
}

return $data;
}
));
}
Expand Down
6 changes: 3 additions & 3 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.1.2</version>
<date>2024-08-09</date>
<version>2.1.3</version>
<date>2024-08-10</date>
</packageinformation>
<authorinformation>
<author>Hanashi Development, Titus Kirch</author>
Expand All @@ -34,7 +34,7 @@
<instruction type="templateListener"/>
<instruction type="database" run="standalone">acp/database/install_dev.tkirch.wsc.faq.php</instruction>
</instructions>
<instructions type="update" fromversion="2.1.1">
<instructions type="update" fromversion="2.1.2">
<instruction type="file"/>
</instructions>
</package>

0 comments on commit 9c0452c

Please sign in to comment.