Differential D14629 Diff 35408 src/applications/transactions/controller/PhabricatorApplicationTransactionCommentRemoveController.php
Changeset View
Changeset View
Standalone View
Standalone View
src/applications/transactions/controller/PhabricatorApplicationTransactionCommentRemoveController.php
| <?php | <?php | ||||
| final class PhabricatorApplicationTransactionCommentRemoveController | final class PhabricatorApplicationTransactionCommentRemoveController | ||||
| extends PhabricatorApplicationTransactionController { | extends PhabricatorApplicationTransactionController { | ||||
| private $phid; | public function handleRequest(AphrontRequest $request) { | ||||
| $viewer = $this->getViewer(); | |||||
| public function willProcessRequest(array $data) { | $phid = $request->getURIData('phid'); | ||||
| $this->phid = $data['phid']; | |||||
| } | |||||
| public function processRequest() { | |||||
| $request = $this->getRequest(); | |||||
| $viewer = $request->getUser(); | |||||
| $xaction = id(new PhabricatorObjectQuery()) | $xaction = id(new PhabricatorObjectQuery()) | ||||
| ->withPHIDs(array($this->phid)) | ->withPHIDs(array($phid)) | ||||
| ->setViewer($viewer) | ->setViewer($viewer) | ||||
| ->executeOne(); | ->executeOne(); | ||||
| if (!$xaction) { | if (!$xaction) { | ||||
| return new Aphront404Response(); | return new Aphront404Response(); | ||||
| } | } | ||||
| if (!$xaction->getComment()) { | if (!$xaction->getComment()) { | ||||
| return new Aphront404Response(); | return new Aphront404Response(); | ||||
| ▲ Show 20 Lines • Show All 54 Lines • Show Last 20 Lines | |||||