}
}
- try {
- $event = $kronolith_driver->getEvent($this->_vars->event);
- } catch (Horde_Exception_NotFound $e) {
- $GLOBALS['notification']->push(_("The requested event was not found."), 'horde.error');
- return $result;
- } catch (Exception $e) {
- $GLOBALS['notification']->push($e);
- return $result;
+ if ($this->_vars->as_new) {
+ $event = $kronolith_driver->getEvent();
+ } else {
+ try {
+ $event = $kronolith_driver->getEvent($this->_vars->event);
+ } catch (Horde_Exception_NotFound $e) {
+ $GLOBALS['notification']->push(_("The requested event was not found."), 'horde.error');
+ return $result;
+ } catch (Exception $e) {
+ $GLOBALS['notification']->push($e);
+ return $result;
+ }
}
+
if (!$event->hasPermission(Horde_Perms::EDIT)) {
$GLOBALS['notification']->push(_("You do not have permission to edit this event."), 'horde.warning');
return $result;