| | |
| | | |
| | | // enable display_errors in 'show' level, but not for ajax requests |
| | | ini_set('display_errors', intval(empty($_REQUEST['_remote']) && ($this->prop['debug_level'] & 4))); |
| | | |
| | | |
| | | // set timezone auto settings values |
| | | if ($this->prop['timezone'] == 'auto') { |
| | | $this->prop['_timezone_auto'] = true; |
| | | $this->prop['dst_active'] = intval(date('I')); |
| | | $this->prop['timezone'] = date('Z') / 3600 - $this->prop['dst_active']; |
| | | $this->prop['_timezone_value'] = date('Z') / 3600 - $this->prop['dst_active']; |
| | | } |
| | | else if ($this->prop['dst_active'] === null) { |
| | | $this->prop['dst_active'] = intval(date('I')); |
| | | } |
| | | |
| | | // export config data |
| | |
| | | { |
| | | $result = isset($this->prop[$name]) ? $this->prop[$name] : $def; |
| | | $rcmail = rcmail::get_instance(); |
| | | |
| | | if ($name == 'timezone' && isset($this->prop['_timezone_value'])) |
| | | $result = $this->prop['_timezone_value']; |
| | | |
| | | if (is_object($rcmail->plugins)) { |
| | | $plugin = $rcmail->plugins->exec_hook('config_get', array( |
| | |
| | | $this->prop = array_merge($this->prop, $prefs); |
| | | |
| | | // override timezone settings with client values |
| | | if ($this->prop['_timezone_auto']) { |
| | | $this->prop['timezone'] = isset($_SESSION['timezone']) ? $_SESSION['timezone'] : $this->prop['timezone']; |
| | | $this->prop['dst_active'] = isset($_SESSION['dst_active']) ? $_SESSION['dst_active'] : $this->prop['dst_active']; |
| | | if ($this->prop['timezone'] == 'auto') { |
| | | $this->prop['_timezone_value'] = isset($_SESSION['timezone']) ? $_SESSION['timezone'] : $this->prop['_timezone_value']; |
| | | $this->prop['dst_active'] = $this->userprefs['dst_active'] = isset($_SESSION['dst_active']) ? $_SESSION['dst_active'] : $this->prop['dst_active']; |
| | | } |
| | | else if (isset($this->prop['_timezone_value'])) |
| | | unset($this->prop['_timezone_value']); |
| | | } |
| | | |
| | | |