[Tickets #14928] Automatically prepare Kronolith's search_sources

noreply at bugs.horde.org noreply at bugs.horde.org
Wed May 22 16:27:44 UTC 2019


DO NOT REPLY TO THIS MESSAGE. THIS EMAIL ADDRESS IS NOT MONITORED.

Ticket URL: https://bugs.horde.org/ticket/14928
------------------------------------------------------------------------------
  Ticket             | 14928
  Created By         | noliveira87 at gmail.com
  Summary            | Automatically prepare Kronolith's search_sources
  Queue              | Horde Groupware Webmail Edition
  Version            | 5.2.22
  Type               | Bug
  State              | Unconfirmed
  Priority           | 3. High
  Milestone          |
  Patch              |
  Owners             |
------------------------------------------------------------------------------


noliveira87 at gmail.com (2019-05-22 16:27) wrote:

Hello,

I've been trying to configure my instance to automatically prepare  
Kronolith's search_sources with all address books the user has access  
to, for that I've enabled  the hook in the local prefs.php  
kronolith/config/prefs.php and configured the hook in  
kronolith/config/hooks.php:

<?PHP
class Kronolith_Hooks
{
     public function prefs_init($pref, $value, $username, $scope_ob)
     {
         if (is_null($username)) {    // not logged in
             return $value;
         }

         switch ($pref) {
         case 'search_sources':    // enable all sources by default
             if ($value == '') {
                 $sources = $GLOBALS['registry']->call('contacts/sources');
                 $value = json_encode(array_keys($sources));
                 $scope_ob->set($pref, $value);
                 $scope_ob->setDirty($pref, true);
             }
             return $value;
         }
     }
}

So when I've tried to login, my search_sources are populated but my  
freebusy doens't work anymore. Before this configuration I had my  
search_source configured manually to look only for my localldap  
configuration and that way my freebusy work fine.

Any idea of what are happening?

Thank you.





More information about the bugs mailing list