summaryrefslogtreecommitdiff
path: root/platform/www/lib/plugins/config/core/Setting/SettingSavedir.php
blob: 43e428dd33b2e5734cdcf7a41e63a3dfe9964bd9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
<?php

namespace dokuwiki\plugin\config\core\Setting;

/**
 * Class setting_savedir
 */
class SettingSavedir extends SettingString {

    /** @inheritdoc */
    public function update($input) {
        if($this->isProtected()) return false;

        $value = is_null($this->local) ? $this->default : $this->local;
        if($value == $input) return false;

        if(!init_path($input)) {
            $this->error = true;
            $this->input = $input;
            return false;
        }

        $this->local = $input;
        return true;
    }
}