Kronolith_Driver::move PHP Method

move() public method

Moves an event to a new calendar.
public move ( string $eventId, string $newCalendar )
$eventId string The event to move.
$newCalendar string The new calendar.
    public function move($eventId, $newCalendar)
    {
        $event = $this->_move($eventId, $newCalendar);
        /* Attempt to move any bound exceptions. */
        foreach ($event->boundExceptions() as $exception) {
            $this->move($exception->id, $newCalendar);
        }
        /* Log the moving of this item in the history log. */
        $uid = $event->uid;
        if ($uid) {
            $history = $GLOBALS['injector']->getInstance('Horde_History');
            try {
                $history->log('kronolith:' . $event->calendar . ':' . $uid, array('action' => 'delete'), true);
                $history->log('kronolith:' . $newCalendar . ':' . $uid, array('action' => 'add'), true);
            } catch (Exception $e) {
                Horde::log($e, 'ERR');
            }
        }
    }