[Tickets #14928] Re: Automatically prepare Kronolith's search_sources
noreply at bugs.horde.org
noreply at bugs.horde.org
Wed May 22 17:34:23 UTC 2019
DO NOT REPLY TO THIS MESSAGE. THIS EMAIL ADDRESS IS NOT MONITORED.
Ticket URL: https://bugs.horde.org/ticket/14928
------------------------------------------------------------------------------
Ticket | 14928
Updated By | fabiojsousa 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 |
------------------------------------------------------------------------------
fabiojsousa at gmail.com (2019-05-22 17:34) wrote:
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.
More information about the bugs
mailing list