Differential D16025 Diff 38577 src/applications/conpherence/controller/ConpherenceUpdateController.php
Changeset View
Changeset View
Standalone View
Standalone View
src/applications/conpherence/controller/ConpherenceUpdateController.php
| Show First 20 Lines • Show All 121 Lines • ▼ Show 20 Lines | if ($request->isFormPost() || ($action == ConpherenceUpdateActions::LOAD)) { | ||||
| case ConpherenceUpdateActions::NOTIFICATIONS: | case ConpherenceUpdateActions::NOTIFICATIONS: | ||||
| $notifications = $request->getStr('notifications'); | $notifications = $request->getStr('notifications'); | ||||
| $participant = $conpherence->getParticipantIfExists($user->getPHID()); | $participant = $conpherence->getParticipantIfExists($user->getPHID()); | ||||
| if (!$participant) { | if (!$participant) { | ||||
| return id(new Aphront404Response()); | return id(new Aphront404Response()); | ||||
| } | } | ||||
| $participant->setSettings(array('notifications' => $notifications)); | $participant->setSettings(array('notifications' => $notifications)); | ||||
| $participant->save(); | $participant->save(); | ||||
| $label = PhabricatorConpherenceNotificationsSetting::getSettingLabel( | |||||
| $notifications); | |||||
| $result = pht( | $result = pht( | ||||
| 'Updated notification settings to "%s".', | 'Updated notification settings to "%s".', | ||||
| ConpherenceSettings::getHumanString($notifications)); | $label); | ||||
| return id(new AphrontAjaxResponse()) | return id(new AphrontAjaxResponse()) | ||||
| ->setContent($result); | ->setContent($result); | ||||
| break; | break; | ||||
| case ConpherenceUpdateActions::METADATA: | case ConpherenceUpdateActions::METADATA: | ||||
| $top = $request->getInt('image_y'); | $top = $request->getInt('image_y'); | ||||
| $left = $request->getInt('image_x'); | $left = $request->getInt('image_x'); | ||||
| $file_id = $request->getInt('file_id'); | $file_id = $request->getInt('file_id'); | ||||
| $title = $request->getStr('title'); | $title = $request->getStr('title'); | ||||
| ▲ Show 20 Lines • Show All 464 Lines • Show Last 20 Lines | |||||