1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-11-25 08:12:40 +01:00
phorge-phorge/src/applications/differential/query/DifferentialDiffInlineCommentQuery.php
epriestley 7427a6e648 Extend TransactionCommentQuery for Differential
Summary: Ref T2009. Ref T1460. Replace hard-coded garbage with a real Query-layer query.

Test Plan: Submitted inline comments in Differential.

Reviewers: btrahan

Reviewed By: btrahan

Subscribers: epriestley

Maniphest Tasks: T2009, T1460

Differential Revision: https://secure.phabricator.com/D12027
2015-03-09 14:11:20 -07:00

31 lines
660 B
PHP

<?php
final class DifferentialDiffInlineCommentQuery
extends PhabricatorDiffInlineCommentQuery {
private $revisionPHIDs;
public function withRevisionPHIDs(array $phids) {
$this->revisionPHIDs = $phids;
return $this;
}
protected function getTemplate() {
return new DifferentialTransactionComment();
}
protected function buildWhereClauseComponents(
AphrontDatabaseConnection $conn_r) {
$where = parent::buildWhereClauseComponents($conn_r);
if ($this->revisionPHIDs !== null) {
$where[] = qsprintf(
$conn_r,
'revisionPHID IN (%Ls)',
$this->revisionPHIDs);
}
return $where;
}
}