Differential D12017 Diff 28942 src/applications/differential/controller/DifferentialInlineCommentEditController.php
Changeset View
Changeset View
Standalone View
Standalone View
src/applications/differential/controller/DifferentialInlineCommentEditController.php
| Show All 34 Lines | final class DifferentialInlineCommentEditController | ||||
| } | } | ||||
| protected function loadComment($id) { | protected function loadComment($id) { | ||||
| return id(new DifferentialInlineCommentQuery()) | return id(new DifferentialInlineCommentQuery()) | ||||
| ->withIDs(array($id)) | ->withIDs(array($id)) | ||||
| ->executeOne(); | ->executeOne(); | ||||
| } | } | ||||
| protected function loadCommentByPHID($phid) { | |||||
| return id(new DifferentialInlineCommentQuery()) | |||||
| ->withPHIDs(array($phid)) | |||||
| ->executeOne(); | |||||
| } | |||||
| protected function loadCommentForEdit($id) { | protected function loadCommentForEdit($id) { | ||||
| $request = $this->getRequest(); | $request = $this->getRequest(); | ||||
| $user = $request->getUser(); | $user = $request->getUser(); | ||||
| $inline = $this->loadComment($id); | $inline = $this->loadComment($id); | ||||
| if (!$this->canEditInlineComment($user, $inline)) { | if (!$this->canEditInlineComment($user, $inline)) { | ||||
| throw new Exception('That comment is not editable!'); | throw new Exception('That comment is not editable!'); | ||||
| } | } | ||||
| ▲ Show 20 Lines • Show All 46 Lines • Show Last 20 Lines | |||||