MFB: Add search_sources pref hook.
authorJan Schneider <jan@horde.org>
Tue, 18 Aug 2009 23:05:47 +0000 (01:05 +0200)
committerJan Schneider <jan@horde.org>
Tue, 18 Aug 2009 23:06:01 +0000 (01:06 +0200)
imp/config/hooks.php.dist
imp/docs/CHANGES

index ecaace2..48417a0 100644 (file)
@@ -51,6 +51,25 @@ class IMP_Hooks
 
 
     /**
+     * PREFERENCE HOOK: Dynamically set the search_sources preference.
+     *
+     * @param string $username  The username.
+     *
+     * @return string  The search_sources value.
+     */
+//    function prefs_hook_search_sources($username = null)
+//    {
+//        if (!$username) {
+//            return;
+//        }
+//
+//        if ($GLOBALS['registry']->hasMethod('contacts/sources')) {
+//            $sources = $GLOBALS['registry']->call('contacts/sources');
+//            return implode("\t", array_keys($sources));
+//        }
+//    }
+
+    /**
      * Perform an action after a message has been sent successfully.
      *
      * @param Horde_Mime_Part $message  The message content object.
index e7a3e47..3ee992f 100644 (file)
@@ -96,6 +96,8 @@ v5.0-git
 v4.3.5-cvs
 ----------
 
+[jan] Add example hook for the search_sources preference (dom.lalot@gmail.com,
+      Request #7796).
 [mms] Fix renaming shared folders contained in empty namespaces (Bug #8468).
 [mms] Correctly handle NO untagged responses on login (Bug #8478).
 [mms] Correctly set charset of Bcc header in sent mail (Bug #8362).
@@ -104,7 +106,7 @@ v4.3.5-cvs
 [mms] Fix some javascript if using IE 8 (uses IE 7 compatibility mode) (Bug
       #8345).
 [jan] Allow to lock default_encrypt preference.
-[mjr] Add example hook showing how to set the add_source preference (Bug #8285).
+[mjr] Add example hook for the add_source preference (Bug #8285).
 [mms] Fix unqualified domain preference (Bug #8272).
 [jan] Highlight signed messages depending on the signature verification.
 [mms] Fix display_folder hook (m.gabriel@das-netzwerkteam.de, Bug #8254).