Skip to content

Commit

Permalink
Use CalendarsManager.
Browse files Browse the repository at this point in the history
  • Loading branch information
yunosh committed Nov 14, 2013
1 parent dba23c3 commit e90ec07
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions kronolith/add.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,10 @@
/* Permission checks on the target calendar . */
switch ($targetType) {
case 'internal':
$kronolith_calendar = $all_calendars[$calendar_id];
$kronolith_calendar = $GLOBALS['calendar_manager']->getEntry(Kronolith::ALL_CALENDARS, $calendar_id);
break;
case 'remote':
$kronolith_calendar = $all_remote_calendars[$calendar_id];
$kronolith_calendar = $GLOBALS['calendar_manager']->getEntry(Kronolith::ALL_REMOTE_CALENDARS, $calendar_id);
break;
case 'resource':
$rid = Kronolith::getDriver('Resource')->getResourceIdByCalendar($calendar_id);
Expand Down
12 changes: 6 additions & 6 deletions kronolith/edit.php
Original file line number Diff line number Diff line change
Expand Up @@ -53,10 +53,10 @@ function _check_max()
$kronolith_driver = Kronolith::getDriver($type, $calendar);
switch ($type) {
case 'internal':
$kronolith_calendar = $all_calendars[$calendar];
$kronolith_calendar = $GLOBALS['calendar_manager']->getEntry(Kronolith::ALL_CALENDARS, $calendar);
break;
case 'remote':
$kronolith_calendar = $all_remote_calendars[$calendar];
$kronolith_calendar = $GLOBALS['calendar_manager']->getEntry(Kronolith::ALL_REMOTE_CALENDARS, $calendar);
break;
}

Expand Down Expand Up @@ -101,10 +101,10 @@ function _check_max()
$kronolith_driver = Kronolith::getDriver($sourceType, $source);
switch ($sourceType) {
case 'internal':
$kronolith_calendar = $all_calendars[$source];
$kronolith_calendar = $GLOBALS['calendar_manager']->getEntry(Kronolith::ALL_CALENDARS, $source);
break;
case 'remote':
$kronolith_calendar = $all_remote_calendars[$source];
$kronolith_calendar = $GLOBALS['calendar_manager']->getEntry(Kronolith::ALL_REMOTE_CALENDARS, $source);
break;
}
$event = $kronolith_driver->getEvent(Horde_Util::getFormData('eventID'));
Expand Down Expand Up @@ -163,10 +163,10 @@ function _check_max()
/* Permission checks on the target calendar . */
switch ($targetType) {
case 'internal':
$kronolith_calendar = $all_calendars[$target];
$kronolith_calendar = $GLOBALS['calendar_manager']->getEntry(Kronolith::ALL_CALENDARS, $target);
break;
case 'remote':
$kronolith_calendar = $all_remote_calendars[$target];
$kronolith_calendar = $GLOBALS['calendar_manager']->getEntry(Kronolith::ALL_REMOTE_CALENDARS, $target);
break;
default:
break 2;
Expand Down

0 comments on commit e90ec07

Please sign in to comment.