Modernize DifferentialInlineCommentQuery
Summary: Ref T7447. This class is currently a big mess with a lot of `withWeirdSpecialThingUsedInOnePlace()` type qualifiers. Try to generalize/normalize it a bit. Test Plan: - Viewed inline comments. - Created a new inline comment. - Edited an inline comment. - Marked an inline comment complete. - Deleted, then undeleted an inline comment. - Previewed inline comments. - Viewed drafts as another user, verified they don't show up. Reviewers: btrahan Reviewed By: btrahan Subscribers: yelirekim, epriestley Maniphest Tasks: T7447 Differential Revision: https://secure.phabricator.com/D12483
This commit is contained in:
@@ -96,7 +96,7 @@ final class DifferentialRevisionViewController extends DifferentialController {
|
||||
$props = mpull($props, 'getData', 'getName');
|
||||
|
||||
$all_changesets = $changesets;
|
||||
$inlines = $revision->loadInlineComments($all_changesets);
|
||||
$inlines = $revision->loadInlineComments($all_changesets, $user);
|
||||
|
||||
$object_phids = array_merge(
|
||||
$revision->getReviewers(),
|
||||
@@ -158,7 +158,10 @@ final class DifferentialRevisionViewController extends DifferentialController {
|
||||
$warning = $warning->render();
|
||||
|
||||
$my_inlines = id(new DifferentialInlineCommentQuery())
|
||||
->withDraftComments($user->getPHID(), $this->revisionID)
|
||||
->setViewer($user)
|
||||
->withDrafts(true)
|
||||
->withAuthorPHIDs(array($user->getPHID()))
|
||||
->withRevisionPHIDs(array($revision->getPHID()))
|
||||
->execute();
|
||||
|
||||
$visible_changesets = array();
|
||||
|
||||
Reference in New Issue
Block a user