xref: /dokuwiki/lib/plugins/config/core/Setting/SettingSavedir.php (revision 946266a367fa29aaa3d9b153b934b57820660179)
1<?php
2
3namespace dokuwiki\plugin\config\core\Setting;
4
5/**
6 * Class setting_savedir
7 */
8class SettingSavedir extends SettingString
9{
10    /** @inheritdoc */
11    public function update($input)
12    {
13        if ($this->isProtected()) return false;
14
15        $value = $this->local ?? $this->default;
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