Changeset View
Changeset View
Standalone View
Standalone View
src/applications/audit/storage/PhabricatorAuditInlineComment.php
| Show First 20 Lines • Show All 62 Lines • ▼ Show 20 Lines | public static function loadPHID($phid) { | ||||
| if (!$inlines) { | if (!$inlines) { | ||||
| return null; | return null; | ||||
| } | } | ||||
| return head(self::buildProxies($inlines)); | return head(self::buildProxies($inlines)); | ||||
| } | } | ||||
| public static function loadDraftComments( | public static function loadDraftComments( | ||||
| PhabricatorUser $viewer, | PhabricatorUser $viewer, | ||||
| $commit_phid) { | $commit_phid, | ||||
| $raw = false) { | |||||
| $inlines = id(new DiffusionDiffInlineCommentQuery()) | $inlines = id(new DiffusionDiffInlineCommentQuery()) | ||||
| ->setViewer($viewer) | ->setViewer($viewer) | ||||
| ->withAuthorPHIDs(array($viewer->getPHID())) | ->withAuthorPHIDs(array($viewer->getPHID())) | ||||
| ->withCommitPHIDs(array($commit_phid)) | ->withCommitPHIDs(array($commit_phid)) | ||||
| ->withHasTransaction(false) | ->withHasTransaction(false) | ||||
| ->withHasPath(true) | ->withHasPath(true) | ||||
| ->withIsDeleted(false) | ->withIsDeleted(false) | ||||
| ->needReplyToComments(true) | ->needReplyToComments(true) | ||||
| ->execute(); | ->execute(); | ||||
| if ($raw) { | |||||
| return $inlines; | |||||
| } | |||||
| return self::buildProxies($inlines); | return self::buildProxies($inlines); | ||||
| } | } | ||||
| public static function loadPublishedComments( | public static function loadPublishedComments( | ||||
| PhabricatorUser $viewer, | PhabricatorUser $viewer, | ||||
| $commit_phid) { | $commit_phid) { | ||||
| $inlines = id(new DiffusionDiffInlineCommentQuery()) | $inlines = id(new DiffusionDiffInlineCommentQuery()) | ||||
| ▲ Show 20 Lines • Show All 264 Lines • Show Last 20 Lines | |||||