1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-12-23 14:00:56 +01:00

Add a withoutIDs method to PhabricatorDaemonLogQuery.

Summary: Add a method to `PhabricatorDaemonLogQuery` to exclude IDs from the results.

Test Plan: Thought long and hard.

Reviewers: epriestley, #blessed_reviewers

Reviewed By: epriestley, #blessed_reviewers

Subscribers: epriestley, Korvin

Differential Revision: https://secure.phabricator.com/D9606
This commit is contained in:
Joshua Spence 2014-06-18 08:07:20 +10:00
parent 125b8dad7b
commit 7892627ccc

View file

@ -7,6 +7,7 @@ final class PhabricatorDaemonLogQuery
const STATUS_ALIVE = 'status-alive';
private $ids;
private $notIDs;
private $status = self::STATUS_ALL;
private $daemonClasses;
private $allowStatusWrites;
@ -24,6 +25,11 @@ final class PhabricatorDaemonLogQuery
return $this;
}
public function withoutIDs(array $ids) {
$this->notIDs = $ids;
return $this;
}
public function withStatus($status) {
$this->status = $status;
return $this;
@ -119,6 +125,13 @@ final class PhabricatorDaemonLogQuery
$this->ids);
}
if ($this->notIDs) {
$where[] = qsprintf(
$conn_r,
'id NOT IN (%Ld)',
$this->notIDs);
}
if ($this->getStatusConstants()) {
$where[] = qsprintf(
$conn_r,