From 0c1cb2fed7c584b31aa7f4df7aa565781dfe0021 Mon Sep 17 00:00:00 2001
From: thomascube <thomas@roundcube.net>
Date: Tue, 27 Sep 2011 05:04:25 -0400
Subject: [PATCH] Fix typo; add attribute to allow html in labels
---
program/include/rcube_config.php | 25 ++++++++++++++++++++++++-
1 files changed, 24 insertions(+), 1 deletions(-)
diff --git a/program/include/rcube_config.php b/program/include/rcube_config.php
index 0e23b03..31b7ed6 100644
--- a/program/include/rcube_config.php
+++ b/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.
--
Gitblit v1.9.1