6.0.0-alpha12
6/12/25

[#14928] Automatically prepare Kronolith's search_sources
Summary Automatically prepare Kronolith's search_sources
Queue Horde Groupware Webmail Edition
Queue Version 5.2.22
Type Bug
State Not A Bug
Priority 1. Low
Owners
Requester noliveira87 (at) gmail (dot) com
Created 05/22/2019 (2213 days ago)
Due 04/22/2019 (2243 days ago)
Updated 05/24/2019 (2211 days ago)
Assigned
Resolved 05/24/2019 (2211 days ago)
Github Issue Link
Github Pull Request
Milestone
Patch No

History
05/24/2019 08:42:25 PM Michael Rubinsky Comment #4
State ⇒ Not A Bug
Priority ⇒ 1. Low
Reply to this comment
Hello,

Can someone help me with this question/problem?

Thank you.
I can't reproduce this.

This is a support question, not a bug report.

Please use the mailing lists to ask for support.

http://www.horde.org/mail/ contains a list of all available mailing lists.
05/24/2019 04:35:46 PM noliveira87 (at) gmail (dot) com Comment #3 Reply to this comment
Hello,

Can someone help me with this question/problem?

Thank you.
05/22/2019 05:34:23 PM fabiojsousa (at) gmail (dot) com Comment #2 Reply to this comment
I've one similar situation but my hook give me more information, give 
me the search_sources and the default fb_cals.

My hook have this configuration:

<?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':
                              $sources = $GLOBALS['registry']->call('contacts/sources');
                         $value = json_encode(array_keys($sources));
                             $scope_ob->set($pref, $value);
                        $scope_ob->setDirty($pref, true);

           case 'fb_cals':
               $fb_cals = @unserialize($GLOBALS['prefs']->getValue('fb_cals'));
               if (empty($fb_cals)) {
                 $display_calendars = 
@unserialize($GLOBALS['prefs']->getValue('display_cals'));
                 $fb_url = 'a:1:{i:0;s:32:"internal_' . 
$display_calendars[0] . '";}';
                 $GLOBALS['prefs']->setValue('fb_cals', $fb_url);
                 $scope_ob->set($pref, $cenas);
                 $scope_ob->setDirty($pref, true);
               }
           return $value;
         }
     }
}

With the search_sources configured  to automatically prepare   
Kronolith's search_sources my freebusy stopped to show about 
availability of an attendee.
05/22/2019 04:27:44 PM noliveira87 (at) gmail (dot) com Comment #1
Priority ⇒ 3. High
Patch ⇒ No
Milestone ⇒
Queue ⇒ Horde Groupware Webmail Edition
Due ⇒ 04/22/2019
Summary ⇒ Automatically prepare Kronolith's search_sources
Type ⇒ Bug
State ⇒ Unconfirmed
Reply to this comment
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.

Saved Queries