6.0.0-beta1
7/17/25

[#12248] Wrong initial sync_calendars preference
Summary Wrong initial sync_calendars preference
Queue Kronolith
Queue Version 4.0.4
Type Bug
State No Feedback
Priority 2. Medium
Owners
Requester lauffer (at) ph-freiburg (dot) de
Created 05/13/2013 (4448 days ago)
Due
Updated 06/10/2013 (4420 days ago)
Assigned 05/13/2013 (4448 days ago)
Resolved 06/10/2013 (4420 days ago)
Github Issue Link
Github Pull Request
Milestone
Patch Yes

History
06/10/2013 11:05:49 AM Jan Schneider State ⇒ No Feedback
 
05/30/2013 07:50:52 PM Michael Rubinsky Comment #5 Reply to this comment
ping?
05/13/2013 10:21:34 AM Jan Schneider Comment #4 Reply to this comment
No, the default is fine. Not touching the default_share preference 
doesn't mean that it isn't set though. Please check this.
05/13/2013 09:54:37 AM lauffer (at) ph-freiburg (dot) de Comment #3 Reply to this comment
Hi Jan!

We did not touch the default_share settings. And yes, that is the 
problem: Why does getDefaultCalender() return foreign calendars.

I guess the answer is in lib/Kronolith.php line 1378, 1379:

static public function getDefaultCalendar($permission = 
Horde_Perms::SHOW, $owner_only = false)

owner_only is default false. Maybe this shouldn't be the default here?

Our idea was not to touch this since we don't know much about this 
function and just to fix the prefs.php
05/13/2013 09:36:55 AM Jan Schneider Comment #2
State ⇒ Feedback
Reply to this comment
The question rather is, why does getDefaultCalendar() return another 
user's calendar? Do you have that set in the default_share preference?
05/13/2013 09:14:51 AM lauffer (at) ph-freiburg (dot) de Comment #1
Priority ⇒ 2. Medium
Type ⇒ Bug
Summary ⇒ Wrong initial sync_calendars preference
Queue ⇒ Kronolith
Milestone ⇒
Patch ⇒ Yes
New Attachment: kronolith-sync_calendars.patch Download
State ⇒ Unconfirmed
Reply to this comment
Hello!

In conf/prefs.php round about line 278 we set the sync_calendars 
preference if unset/empty:

if (empty($sync)) {
   $GLOBALS['prefs']->setValue('sync_calendars', 
serialize(array(Kronolith::getDefaultCalendar())));
}

This may end in a wrong entry if the user has other calendars (f.e. 
shared ones by other users), too. In our cases our customers f.e. got 
its 1st foreign calendar synced.

This wrong entry will not be shown in the webfrontend.

We fixed the problem with just use calendars owned by this user:

$GLOBALS['prefs']->setValue('sync_calendars', 
serialize(array(Kronolith::getDefaultCalendar(Horde_Perms::EDIT, 
true))));

What do you think? Is this bugfix ok?

Saved Queries