thomascube
2011-09-28 63d6e6dfc35e6d82c4a64f37c408794c163becd4
program/include/rcube_config.php
@@ -150,7 +150,17 @@
     */
    public function get($name, $def = null)
    {
        return isset($this->prop[$name]) ? $this->prop[$name] : $def;
        $result = isset($this->prop[$name]) ? $this->prop[$name] : $def;
        $rcmail = rcmail::get_instance();
        if (is_object($rcmail->plugins)) {
            $plugin = $rcmail->plugins->exec_hook('config_get', array(
                'name' => $name, 'default' => $def, 'result' => $result));
            return $plugin['result'];
        }
        return $result;
    }
@@ -210,6 +220,19 @@
        return $this->prop;
    }
    /**
     * Special getter for user's timezone
     */
    public function get_timezone()
    {
      $tz = $this->get('timezone');
      if ($tz == 'auto')
        $tz = isset($_SESSION['timezone']) ? $_SESSION['timezone'] : date('Z') / 3600;
      else
        $tz = intval($tz) + intval($this->get('dst_active'));
      return $tz;
    }
    /**
     * Return requested DES crypto key.