Abstract access to DifferentialInlineComment behind a Query
Summary: Ref T2222. See D6260. Push all this junk behind a Query so I can move the storage out from underneath it. Test Plan: Viewed home page, list view, revision. Made draft, looked at preview, submitted draft, viewed inline, replied to inline. Reviewers: btrahan Reviewed By: btrahan CC: chad, aran Maniphest Tasks: T2222 Differential Revision: https://secure.phabricator.com/D6262
This commit is contained in:
@@ -194,12 +194,9 @@ final class DifferentialRevisionViewController extends DifferentialController {
|
||||
pht('Show All Files Inline'))));
|
||||
$warning = $warning->render();
|
||||
|
||||
$my_inlines = id(new DifferentialInlineComment())->loadAllWhere(
|
||||
'revisionID = %d AND commentID IS NULL AND authorPHID = %s AND '.
|
||||
'changesetID IN (%Ld)',
|
||||
$this->revisionID,
|
||||
$user->getPHID(),
|
||||
mpull($changesets, 'getID'));
|
||||
$my_inlines = id(new DifferentialInlineCommentQuery())
|
||||
->withDraftComments($user->getPHID(), $this->revisionID)
|
||||
->execute();
|
||||
|
||||
$visible_changesets = array();
|
||||
foreach ($inlines + $my_inlines as $inline) {
|
||||
@@ -643,10 +640,9 @@ final class DifferentialRevisionViewController extends DifferentialController {
|
||||
return $inline_comments;
|
||||
}
|
||||
|
||||
$inline_comments = id(new DifferentialInlineComment())
|
||||
->loadAllWhere(
|
||||
'commentID in (%Ld)',
|
||||
$comment_ids);
|
||||
$inline_comments = id(new DifferentialInlineCommentQuery())
|
||||
->withCommentIDs($comment_ids)
|
||||
->execute();
|
||||
|
||||
$load_changesets = array();
|
||||
foreach ($inline_comments as $inline) {
|
||||
|
||||
Reference in New Issue
Block a user