Differential D16248 Diff 39124 src/applications/calendar/controller/PhabricatorCalendarEventJoinController.php
Changeset View
Changeset View
Standalone View
Standalone View
src/applications/calendar/controller/PhabricatorCalendarEventJoinController.php
Show All 14 Lines | public function handleRequest(AphrontRequest $request) { | ||||
$viewer = $request->getViewer(); | $viewer = $request->getViewer(); | ||||
$declined_status = PhabricatorCalendarEventInvitee::STATUS_DECLINED; | $declined_status = PhabricatorCalendarEventInvitee::STATUS_DECLINED; | ||||
$attending_status = PhabricatorCalendarEventInvitee::STATUS_ATTENDING; | $attending_status = PhabricatorCalendarEventInvitee::STATUS_ATTENDING; | ||||
$event = id(new PhabricatorCalendarEventQuery()) | $event = id(new PhabricatorCalendarEventQuery()) | ||||
->setViewer($viewer) | ->setViewer($viewer) | ||||
->withIDs(array($id)) | ->withIDs(array($id)) | ||||
->executeOne(); | ->executeOne(); | ||||
if (!$event) { | if (!$event) { | ||||
return new Aphront404Response(); | return new Aphront404Response(); | ||||
} | } | ||||
$cancel_uri = '/E'.$event->getID(); | $cancel_uri = $event->getURI(); | ||||
$validation_exception = null; | $validation_exception = null; | ||||
$is_attending = $event->getIsUserAttending($viewer->getPHID()); | $is_attending = $event->getIsUserAttending($viewer->getPHID()); | ||||
if ($request->isFormPost()) { | if ($request->isFormPost()) { | ||||
$new_status = null; | $new_status = null; | ||||
switch ($action) { | switch ($action) { | ||||
▲ Show 20 Lines • Show All 54 Lines • Show Last 20 Lines |