add a return to the error path for new events

This commit is contained in:
Evan Prodromou 2011-08-27 14:56:02 -04:00
parent 8501ddf0ee
commit ebaf5a972e
2 changed files with 4 additions and 3 deletions

View File

@ -155,7 +155,7 @@ class Happening extends Managed_DataObject
// XXX: does this get truncated? // XXX: does this get truncated?
// TRANS: Event description. %1$s is a title, %2$s is start time, %3$s is end time, // TRANS: Event description. %1$s is a title, %2$s is start time, %3$s is end time,
// TRANS: %4$s is location, %5$s is a description. // TRANS: %4$s is location, %5$s is a description.
$content = sprintf(_m('"%1$s" %2$s - %3$s (%4$s): %5$s'), $content = sprintf(_m('"%1$s" %2$s - %3$s (%4$s): %5$s'),
$title, $title,
common_exact_date($ev->start_time), common_exact_date($ev->start_time),
@ -164,8 +164,8 @@ class Happening extends Managed_DataObject
$description); $description);
// TRANS: Rendered event description. %1$s is a title, %2$s is start time, %3$s is start time, // TRANS: Rendered event description. %1$s is a title, %2$s is start time, %3$s is start time,
// TRANS: %4$s is end time, %5$s is end time, %6$s is location, %7$s is description. // TRANS: %4$s is end time, %5$s is end time, %6$s is location, %7$s is description.
// TRANS: Class names should not be translated. // TRANS: Class names should not be translated.
$rendered = sprintf(_m('<span class="vevent">'. $rendered = sprintf(_m('<span class="vevent">'.
'<span class="summary">%1$s</span> '. '<span class="summary">%1$s</span> '.
'<abbr class="dtstart" title="%2$s">%3$s</a> - '. '<abbr class="dtstart" title="%2$s">%3$s</a> - '.

View File

@ -233,6 +233,7 @@ class NeweventAction extends Action
} catch (ClientException $ce) { } catch (ClientException $ce) {
if ($this->boolean('ajax')) { if ($this->boolean('ajax')) {
$this->outputAjaxError($ce->getMessage()); $this->outputAjaxError($ce->getMessage());
return;
} else { } else {
$this->error = $ce->getMessage(); $this->error = $ce->getMessage();
$this->showPage(); $this->showPage();