From 5948c30c7324b9021749ac2858c5a838f522fbf4 Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Thu, 21 Jan 2010 02:59:10 +0000 Subject: [PATCH] allow other apps to answer settings hook for a given app --- preferences/inc/class.bosettings.inc.php | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/preferences/inc/class.bosettings.inc.php b/preferences/inc/class.bosettings.inc.php index 807cfce649..185ba981da 100644 --- a/preferences/inc/class.bosettings.inc.php +++ b/preferences/inc/class.bosettings.inc.php @@ -72,7 +72,7 @@ translation::add_app('preferences'); // we need the prefs translations too } - // calling the settings hook + // calling app specific settings hook $settings = $GLOBALS['egw']->hooks->single('settings',$this->appname); // it either returns the settings or save it in $GLOBALS['settings'] (deprecated!) if (isset($settings) && is_array($settings) && $settings) @@ -88,6 +88,14 @@ return False; // no settings returned } + // calling settings hook all apps can answer (for a specific app) + foreach($GLOBALS['egw']->hooks->process('settings_'.$this->appname,$this->appname) as $app => $settings) + { + if (isset($settings) && is_array($settings) && $settings) + { + $this->settings = array_merge($this->settings,$settings); + } + } /* Remove ui-only settings */ if($this->xmlrpc) {