Differential D12128 Diff 29184 src/applications/diffusion/controller/DiffusionInlineCommentController.php
Changeset View
Changeset View
Standalone View
Standalone View
src/applications/diffusion/controller/DiffusionInlineCommentController.php
| Show First 20 Lines • Show All 64 Lines • ▼ Show 20 Lines | protected function loadCommentForDone($id) { | ||||
| $inline = $this->loadComment($id); | $inline = $this->loadComment($id); | ||||
| if (!$inline) { | if (!$inline) { | ||||
| throw new Exception(pht('Failed to load comment "%d".', $id)); | throw new Exception(pht('Failed to load comment "%d".', $id)); | ||||
| } | } | ||||
| $commit = id(new DiffusionCommitQuery()) | $commit = id(new DiffusionCommitQuery()) | ||||
| ->setViewer($viewer) | ->setViewer($viewer) | ||||
| ->withPHIDs(array($inline->getCommitPHID())) | ->withPHIDs(array($inline->getCommitPHID())) | ||||
| ->exeucteOne(); | ->executeOne(); | ||||
btrahan: nice | |||||
| if (!$commit) { | if (!$commit) { | ||||
| throw new Exception(pht('Failed to load commit.')); | throw new Exception(pht('Failed to load commit.')); | ||||
| } | } | ||||
| if ((!$commit->getAuthorPHID()) || | if ((!$commit->getAuthorPHID()) || | ||||
| ($commit->getAuthorPHID() != $viewer->getPHID())) { | ($commit->getAuthorPHID() != $viewer->getPHID())) { | ||||
| throw new Exception(pht('You can not mark this comment as complete.')); | throw new Exception(pht('You can not mark this comment as complete.')); | ||||
| } | } | ||||
| Show All 35 Lines | |||||
nice