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 if($input === '') { 19 if($input == $this->local) return false; 20 $this->local = $input; 21 return true; 22 } 23 24 return parent::update($input); 25 } 26} 27