Skip to content

Commit 4536104

Browse files
authored
Merge pull request #230 from HanashiDev/2.1
fix edit bug
2 parents 81d160f + 9c0452c commit 4536104

File tree

2 files changed

+13
-3
lines changed

2 files changed

+13
-3
lines changed

files/lib/acp/form/FaqQuestionAddForm.class.php

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
use wcf\data\faq\category\FaqCategoryNodeTree;
77
use wcf\data\faq\QuestionAction;
88
use wcf\data\faq\QuestionEditor;
9+
use wcf\data\IStorableObject;
910
use wcf\form\AbstractFormBuilderForm;
1011
use wcf\system\exception\NamedUserException;
1112
use wcf\system\form\builder\container\FormContainer;
@@ -59,6 +60,8 @@ class FaqQuestionAddForm extends AbstractFormBuilderForm
5960

6061
protected $isMultilingual = 0;
6162

63+
protected $multiLingualAnswers = [];
64+
6265
/**
6366
* @inheritDoc
6467
*/
@@ -198,6 +201,13 @@ static function (IFormDocument $document, array $parameters) {
198201
}
199202

200203
return $parameters;
204+
},
205+
function (IFormDocument $document, array $data, IStorableObject $object) {
206+
foreach ($this->multiLingualAnswers as $languageID => $answer) {
207+
$data['answer_i18n_' . $languageID] = $answer;
208+
}
209+
210+
return $data;
201211
}
202212
));
203213
}

package.xml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@
66
<packagename language="de">Simple FAQ</packagename>
77
<packagedescription>A simple and powerful FAQ for your WSC.</packagedescription>
88
<packagedescription language="de">Ein simples und leistungsstarkes FAQ für Ihr WSC.</packagedescription>
9-
<version>2.1.2</version>
10-
<date>2024-08-09</date>
9+
<version>2.1.3</version>
10+
<date>2024-08-10</date>
1111
</packageinformation>
1212
<authorinformation>
1313
<author>Hanashi Development, Titus Kirch</author>
@@ -34,7 +34,7 @@
3434
<instruction type="templateListener"/>
3535
<instruction type="database" run="standalone">acp/database/install_dev.tkirch.wsc.faq.php</instruction>
3636
</instructions>
37-
<instructions type="update" fromversion="2.1.1">
37+
<instructions type="update" fromversion="2.1.2">
3838
<instruction type="file"/>
3939
</instructions>
4040
</package>

0 commit comments

Comments
 (0)