Skip to content

Commit

Permalink
- Plugin API: Added 'config_get' hook
Browse files Browse the repository at this point in the history
  • Loading branch information
alecpl committed Jul 25, 2011
1 parent 2d761bb commit 1837173
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
CHANGELOG Roundcube Webmail
===========================

- Plugin API: Added 'config_get' hook
- Fixed new_user_identity plugin to work with updated rcube_ldap class (#1487994)
- Plugin API: added folder_delete and folder_rename hooks
- Added possibility to undo last contact delete operation
Expand Down
12 changes: 11 additions & 1 deletion program/include/rcube_config.php
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,17 @@ public function load_from_file($fpath)
*/
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;
}


Expand Down

0 comments on commit 1837173

Please sign in to comment.