fix settings (again)

This commit is contained in:
Jean-Christian Denis 2023-06-18 09:05:24 +02:00
parent 04c6a067fa
commit 444bff5a07
Signed by: JcDenis
GPG key ID: 1B5B8C5B90B6C951
4 changed files with 13 additions and 4 deletions

View file

@ -4,6 +4,11 @@ dev
- [ ] fix third-party API (temp removed)
- [ ] fix multiline translations
2023.06.18
- require dotclear 2.26
- require php 8.1+
- fix settings (again)
2023.05.13
- require dotclear 2.26
- require php 8.1+

View file

@ -18,7 +18,7 @@ $this->registerModule(
'Translater',
'Translate your Dotclear plugins and themes',
'Jean-Christian Denis & contributors',
'2023.05.13',
'2023.06.18',
[
'requires' => [
['php', '8.1'],

View file

@ -2,10 +2,10 @@
<modules xmlns:da="http://dotaddict.org/da/">
<module id="translater">
<name>Translater</name>
<version>2023.05.13</version>
<version>2023.06.18</version>
<author>Jean-Christian Denis &amp; contributors</author>
<desc>Translate your Dotclear plugins and themes</desc>
<file>https://github.com/JcDenis/translater/releases/download/v2023.05.13/plugin-translater.zip</file>
<file>https://github.com/JcDenis/translater/releases/download/v2023.06.18/plugin-translater.zip</file>
<da:dcmin>2.26</da:dcmin>
<da:details>https://plugins.dotaddict.org/dc2/details/translater</da:details>
<da:support>http://forum.dotclear.org/viewtopic.php?id=39220</da:support>

View file

@ -56,7 +56,11 @@ class Config extends dcNsProcess
try {
foreach ($s->listSettings() as $key => $value) {
$s->writeSetting($key, $_POST[$key] ?? $value);
if (is_bool($value)) {
$s->writeSetting($key, !empty($_POST[$key]));
} else {
$s->writeSetting($key, $_POST[$key] ?? $value);
}
}
dcPage::addSuccessNotice(