From 18371736346a2f71f37f68e6fd13de8b230a8baf Mon Sep 17 00:00:00 2001
From: alecpl <alec@alec.pl>
Date: Mon, 25 Jul 2011 03:49:14 -0400
Subject: [PATCH] - Plugin API: Added 'config_get' hook
---
program/include/rcube_config.php | 12 +++++++++++-
1 files changed, 11 insertions(+), 1 deletions(-)
diff --git a/program/include/rcube_config.php b/program/include/rcube_config.php
index 0e23b03..9379e9e 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;
}
--
Gitblit v1.9.1