mirror of
https://we.phorge.it/source/phorge.git
synced 2024-11-25 16:22:43 +01:00
Fix a mistakenly translated query from D6262
Summary: Ref T2222. I didn't translate this query properly; reproduce the original. Test Plan: When viewing a revision with non-draft inline comments by a user other than the viewer, the inline comments now appear on the changesets themselves. Reviewers: kawakami, btrahan, garoevans Reviewed By: garoevans CC: aran, mbishopim3 Maniphest Tasks: T2222 Differential Revision: https://secure.phabricator.com/D6281
This commit is contained in:
parent
e40f0e13c5
commit
d0da409eb0
2 changed files with 9 additions and 9 deletions
|
@ -269,7 +269,7 @@ final class DifferentialChangesetViewController extends DifferentialController {
|
|||
}
|
||||
|
||||
return id(new DifferentialInlineCommentQuery())
|
||||
->withAuthorAndChangesetIDs($author_phid, $changeset_ids)
|
||||
->withViewerAndChangesetIDs($author_phid, $changeset_ids)
|
||||
->execute();
|
||||
}
|
||||
|
||||
|
|
|
@ -11,7 +11,7 @@ final class DifferentialInlineCommentQuery
|
|||
private $ids;
|
||||
private $commentIDs;
|
||||
|
||||
private $authorAndChangesetIDs;
|
||||
private $viewerAndChangesetIDs;
|
||||
private $draftComments;
|
||||
private $draftsByAuthors;
|
||||
|
||||
|
@ -35,8 +35,8 @@ final class DifferentialInlineCommentQuery
|
|||
return $this;
|
||||
}
|
||||
|
||||
public function withAuthorAndChangesetIDs($author_phid, array $ids) {
|
||||
$this->authorAndChangesetIDs = array($author_phid, $ids);
|
||||
public function withViewerAndChangesetIDs($author_phid, array $ids) {
|
||||
$this->viewerAndChangesetIDs = array($author_phid, $ids);
|
||||
return $this;
|
||||
}
|
||||
|
||||
|
@ -98,13 +98,13 @@ final class DifferentialInlineCommentQuery
|
|||
$this->commentIDs);
|
||||
}
|
||||
|
||||
if ($this->authorAndChangesetIDs) {
|
||||
list($phid, $ids) = $this->authorAndChangesetIDs;
|
||||
if ($this->viewerAndChangesetIDs) {
|
||||
list($phid, $ids) = $this->viewerAndChangesetIDs;
|
||||
$where[] = qsprintf(
|
||||
$conn_r,
|
||||
'authorPHID = %s AND changesetID IN (%Ld)',
|
||||
$phid,
|
||||
$ids);
|
||||
'changesetID IN (%Ld) AND (authorPHID = %s OR commentID IS NOT NULL)',
|
||||
$ids,
|
||||
$phid);
|
||||
}
|
||||
|
||||
if ($this->draftComments) {
|
||||
|
|
Loading…
Reference in a new issue