Changeset View
Changeset View
Standalone View
Standalone View
src/applications/audit/storage/PhabricatorAuditInlineComment.php
Show First 20 Lines • Show All 59 Lines • ▼ Show 20 Lines | public static function loadDraftComments( | ||||
$commit_phid, | $commit_phid, | ||||
$raw = false) { | $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) | |||||
->withIsDeleted(false) | ->withIsDeleted(false) | ||||
->needReplyToComments(true) | ->needReplyToComments(true) | ||||
->execute(); | ->execute(); | ||||
if ($raw) { | if ($raw) { | ||||
return $inlines; | 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()) | ||||
->setViewer($viewer) | ->setViewer($viewer) | ||||
->withCommitPHIDs(array($commit_phid)) | ->withCommitPHIDs(array($commit_phid)) | ||||
->withHasTransaction(true) | ->withHasTransaction(true) | ||||
->withHasPath(true) | |||||
->execute(); | ->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, | ||||
▲ Show 20 Lines • Show All 65 Lines • Show Last 20 Lines |