}
$start = $startDate . ' ' . $startTime . ' ' . $tz;
-
- common_debug("Event start: '$start'");
-
- $end = $endDate . ' ' . $endTime . ' ' . $tz;
-
- common_debug("Event start: '$end'");
+ $end = $endDate . ' ' . $endTime . ' ' . $tz;
$this->startTime = strtotime($start);
$this->endTime = strtotime($end);
function newEvent()
{
try {
+
if (empty($this->title)) {
// TRANS: Client exception thrown when trying to post an event without providing a title.
throw new ClientException(_m('Event must have a title.'));
throw new ClientException(_m('Event must have an end time.'));
}
+ if (isset($this->url) && Validate::uri($this->url) === false) {
+ // TRANS: Client exception thrown when trying to post an event with an invalid URL.
+ throw new ClientException(_m('URL must be valid.'));
+ }
+
$options = array();
// Does the heavy-lifting for getting "To:" information