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