Skip to content

Commit

Permalink
Always save the new display pref when toggling.
Browse files Browse the repository at this point in the history
  • Loading branch information
mrubinsk committed Sep 29, 2013
1 parent 8bde087 commit ec07f36
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions kronolith/lib/CalendarsManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -298,6 +298,7 @@ protected function _checkToggleCalendars()
} else {
unset($this->_displayRemote[$key]);
}
$prefs->setValue('display_remote_cals', serialize($this->_displayRemote));
} elseif ((strncmp($calId, 'external_', 9) === 0 &&
($calId = substr($calId, 9))) ||
(strncmp($calId, 'tasklists_', 10) === 0 &&
Expand All @@ -307,6 +308,7 @@ protected function _checkToggleCalendars()
} else {
unset($this->_displayExternal[$key]);
}
$prefs->setValue('display_external_cals', serialize($this->_displayExternal));

if (strpos($calId, 'tasks/') === 0) {
$tasklists = array();
Expand All @@ -326,6 +328,7 @@ protected function _checkToggleCalendars()
} else {
unset($this->_displayHolidaysInternal[$key]);
}
$prefs->setValue('holiday_drivers', serialize($this->_displayHolidaysInternal));
} elseif (strncmp($calId, 'resource_', 9) === 0) {
$calId = substr($calId, 9);
if (($key = array_search($calId, $this->_displayResource)) === false) {
Expand Down

0 comments on commit ec07f36

Please sign in to comment.