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