SettingSavedir.php 556 B

1234567891011121314151617181920212223242526
  1. <?php
  2. namespace dokuwiki\plugin\config\core\Setting;
  3. /**
  4. * Class setting_savedir
  5. */
  6. class SettingSavedir extends SettingString {
  7. /** @inheritdoc */
  8. public function update($input) {
  9. if($this->isProtected()) return false;
  10. $value = is_null($this->local) ? $this->default : $this->local;
  11. if($value == $input) return false;
  12. if(!init_path($input)) {
  13. $this->error = true;
  14. $this->input = $input;
  15. return false;
  16. }
  17. $this->local = $input;
  18. return true;
  19. }
  20. }