Page MenuHomePhabricator

D15199.id36694.diff
No OneTemporary

D15199.id36694.diff

diff --git a/src/applications/people/controller/PhabricatorPeopleProfileViewController.php b/src/applications/people/controller/PhabricatorPeopleProfileViewController.php
--- a/src/applications/people/controller/PhabricatorPeopleProfileViewController.php
+++ b/src/applications/people/controller/PhabricatorPeopleProfileViewController.php
@@ -130,7 +130,10 @@
->setViewer($viewer)
->withMemberPHIDs(array($user->getPHID()))
->needImages(true)
- ->withStatus(PhabricatorProjectQuery::STATUS_OPEN)
+ ->withStatuses(
+ array(
+ PhabricatorProjectStatus::STATUS_ACTIVE,
+ ))
->execute();
$header = id(new PHUIHeaderView())
diff --git a/src/applications/policy/query/PhabricatorPolicyQuery.php b/src/applications/policy/query/PhabricatorPolicyQuery.php
--- a/src/applications/policy/query/PhabricatorPolicyQuery.php
+++ b/src/applications/policy/query/PhabricatorPolicyQuery.php
@@ -230,6 +230,10 @@
->setViewer($viewer)
->withMemberPHIDs(array($viewer->getPHID()))
->withIsMilestone(false)
+ ->withStatuses(
+ array(
+ PhabricatorProjectStatus::STATUS_ACTIVE,
+ ))
->setLimit($default_limit)
->execute();
$default_projects = mpull($default_projects, null, 'getPHID');
diff --git a/src/applications/project/query/PhabricatorProjectQuery.php b/src/applications/project/query/PhabricatorProjectQuery.php
--- a/src/applications/project/query/PhabricatorProjectQuery.php
+++ b/src/applications/project/query/PhabricatorProjectQuery.php
@@ -27,6 +27,7 @@
const STATUS_CLOSED = 'status-closed';
const STATUS_ACTIVE = 'status-active';
const STATUS_ARCHIVED = 'status-archived';
+ private $statuses;
private $needSlugs;
private $needMembers;
@@ -49,6 +50,11 @@
return $this;
}
+ public function withStatuses(array $statuses) {
+ $this->statuses = $statuses;
+ return $this;
+ }
+
public function withMemberPHIDs(array $member_phids) {
$this->memberPHIDs = $member_phids;
return $this;
@@ -387,6 +393,13 @@
$filter);
}
+ if ($this->statuses !== null) {
+ $where[] = qsprintf(
+ $conn,
+ 'status IN (%Ls)',
+ $this->statuses);
+ }
+
if ($this->ids !== null) {
$where[] = qsprintf(
$conn,

File Metadata

Mime Type
text/plain
Expires
Sun, Nov 3, 7:41 AM (2 w, 1 d ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
6729442
Default Alt Text
D15199.id36694.diff (2 KB)

Event Timeline