Skip to content
Permalink
Browse files

fix numericopt setting

In 55a4f13 a bug was introduced that

* forced resaving the config even if it hadn't changed
* prevented setting the value to an empty string once set
  • Loading branch information...
splitbrain committed May 25, 2018
1 parent 5f43ccc commit f37fd93eb642c709ffd1cbb73dee42771c53a56e
@@ -0,0 +1,23 @@
<?php
namespace dokuwiki\plugin\config\test\Setting;
/**
* @group plugin_config
* @group admin_plugins
* @group plugins
* @group bundled_plugins
*/
class SettingNumericoptTest extends SettingNumericTest {
/** @inheritdoc */
public function dataOut() {
return array_merge(
parent::dataOut(),
[
['', "\$conf['test'] = '';\n"],
]
);
}
}
@@ -15,6 +15,8 @@ class SettingNumericopt extends SettingNumeric {
*/
public function update($input) {
if($input === '') {
if($input == $this->local) return false;
$this->local = $input;
return true;
}

1 comment on commit f37fd93

@Chris--S

This comment was marked as resolved.

Copy link
Collaborator

commented on f37fd93 May 25, 2018

👍

Please sign in to comment.
You can’t perform that action at this time.