Skip to content

Commit

Permalink
Don't look for resource calendars if we know we don't have them.
Browse files Browse the repository at this point in the history
Prevents exception if they were enabled at one point, but disabled
later.
  • Loading branch information
mrubinsk committed Apr 11, 2015
1 parent 02c54c9 commit 35b99b1
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions kronolith/lib/CalendarsManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -285,9 +285,12 @@ protected function _checkDisplayCals()
'display_cals' => 'displayCalendars',
'display_remote_cals' => 'displayRemote',
'display_external_cals' => 'displayExternal',
'holiday_drivers' => 'displayHolidaysInternal',
'display_resource_cals' => 'displayResource'
);
'holiday_drivers' => 'displayHolidaysInternal');

if (!empty($GLOBALS['conf']['resource']['driver'])) {
$display_prefs['display_resource_cals'] = 'displayResource';
}

foreach ($display_prefs as $key => $val) {
$pref_val = @unserialize($prefs->getValue($key));
$val = '_' . $val;
Expand Down

0 comments on commit 35b99b1

Please sign in to comment.