1<?php
2
3namespace dokuwiki\plugin\config\core\Setting;
4
5/**
6 * Class setting_numericopt
7 */
8class SettingNumericopt extends SettingNumeric
9{
10    // just allow an empty config
11    protected $pattern = '/^(|[-]?\d+(?:[-+*]\d+)*)$/';
12
13    /**
14     * @inheritdoc
15     * Empty string is valid for numericopt
16     */
17    public function update($input)
18    {
19        if ($input === '') {
20            if ($input == $this->local) return false;
21            $this->local = $input;
22            return true;
23        }
24
25        return parent::update($input);
26    }
27}
28