Changeset View
Changeset View
Standalone View
Standalone View
src/applications/audit/storage/PhabricatorAuditInlineComment.php
| Show First 20 Lines • Show All 55 Lines • ▼ Show 20 Lines | public static function loadPHID($phid) { | ||||
| } | } | ||||
| 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) { | ||||
| $inlines = id(new PhabricatorAuditTransactionComment())->loadAllWhere( | $inlines = id(new DiffusionDiffInlineCommentQuery()) | ||||
| 'authorPHID = %s AND commitPHID = %s AND transactionPHID IS NULL | ->setViewer($viewer) | ||||
| AND pathID IS NOT NULL | ->withAuthorPHIDs(array($viewer->getPHID())) | ||||
| AND isDeleted = 0', | ->withCommitPHIDs(array($commit_phid)) | ||||
| $viewer->getPHID(), | ->withHasTransaction(false) | ||||
| $commit_phid); | ->withHasPath(true) | ||||
| ->withIsDeleted(false) | |||||
| $inlines = PhabricatorInlineCommentController::loadAndAttachReplies( | ->needReplyToComments(true) | ||||
| $viewer, | ->execute(); | ||||
| $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 PhabricatorAuditTransactionComment())->loadAllWhere( | $inlines = id(new DiffusionDiffInlineCommentQuery()) | ||||
| 'commitPHID = %s AND transactionPHID IS NOT NULL | ->setViewer($viewer) | ||||
| AND pathID IS NOT NULL', | ->withCommitPHIDs(array($commit_phid)) | ||||
| $commit_phid); | ->withHasTransaction(true) | ||||
| ->withHasPath(true) | |||||
| ->execute(); | |||||
| return self::buildProxies($inlines); | return self::buildProxies($inlines); | ||||
| } | } | ||||
| public static function loadDraftAndPublishedComments( | public static function loadDraftAndPublishedComments( | ||||
| PhabricatorUser $viewer, | PhabricatorUser $viewer, | ||||
| $commit_phid, | $commit_phid, | ||||
| $path_id = null) { | $path_id = null) { | ||||
| ▲ Show 20 Lines • Show All 224 Lines • Show Last 20 Lines | |||||