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:
@@ -39,13 +39,17 @@ final class DifferentialInlineCommentEditController
|
||||
|
||||
protected function loadComment($id) {
|
||||
return id(new DifferentialInlineCommentQuery())
|
||||
->setViewer($this->getViewer())
|
||||
->withIDs(array($id))
|
||||
->withDeletedDrafts(true)
|
||||
->executeOne();
|
||||
}
|
||||
|
||||
protected function loadCommentByPHID($phid) {
|
||||
return id(new DifferentialInlineCommentQuery())
|
||||
->setViewer($this->getViewer())
|
||||
->withPHIDs(array($phid))
|
||||
->withDeletedDrafts(true)
|
||||
->executeOne();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user