xref: /dokuwiki/lib/plugins/config/core/Setting/SettingSavedir.php (revision d868eb89f182718a31113373a6272670bd7f8012)
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    {
14        if($this->isProtected()) return false;
15
16        $value = is_null($this->local) ? $this->default : $this->local;
17        if($value == $input) return false;
18
19        if(!init_path($input)) {
20            $this->error = true;
21            $this->input = $input;
22            return false;
23        }
24
25        $this->local = $input;
26        return true;
27    }
28}
29