Skip to content

Commit

Permalink
Use correct criteria for detecting the default sync_calendars.
Browse files Browse the repository at this point in the history
For the enum list we already consider permissions and sync_no_multiplex, but not for the default value.
  • Loading branch information
yunosh committed Jun 22, 2015
1 parent 835812c commit 194c74f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion kronolith/config/prefs.php
Expand Up @@ -275,7 +275,7 @@
$enum = array();
$sync = @unserialize($GLOBALS['prefs']->getValue('sync_calendars'));
if (empty($sync)) {
$GLOBALS['prefs']->setValue('sync_calendars', serialize(array(Kronolith::getDefaultCalendar())));
$GLOBALS['prefs']->setValue('sync_calendars', serialize(array(Kronolith::getDefaultCalendar(Horde_Perms::EDIT, !$GLOBALS['prefs']->getValue('activesync_no_multiplex')))));
}
foreach (Kronolith::listInternalCalendars(!$GLOBALS['prefs']->getValue('activesync_no_multiplex'), Horde_Perms::EDIT) as $key => $cal) {
if ($cal->getName() != Kronolith::getDefaultCalendar(Horde_Perms::EDIT)) {
Expand Down

0 comments on commit 194c74f

Please sign in to comment.