summaryrefslogtreecommitdiff
path: root/program/include/rcube_config.php
diff options
context:
space:
mode:
authoralecpl <alec@alec.pl>2011-07-25 07:49:14 +0000
committeralecpl <alec@alec.pl>2011-07-25 07:49:14 +0000
commit18371736346a2f71f37f68e6fd13de8b230a8baf (patch)
tree1f067ccc4e625af125ce12e4d9207d775423baa0 /program/include/rcube_config.php
parent2d761bbbefecf1aefe7815cff7a6ed5a43dcf960 (diff)
- Plugin API: Added 'config_get' hook
Diffstat (limited to 'program/include/rcube_config.php')
-rw-r--r--program/include/rcube_config.php12
1 files changed, 11 insertions, 1 deletions
diff --git a/program/include/rcube_config.php b/program/include/rcube_config.php
index 0e23b0396..9379e9e7b 100644
--- a/program/include/rcube_config.php
+++ b/program/include/rcube_config.php
@@ -150,7 +150,17 @@ class rcube_config
*/
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;
}