@recaptime-dev's working patches + fork for Phorge, a community fork of Phabricator. (Upstream dev and stable branches are at upstream/main and upstream/stable respectively.) hq.recaptime.dev/wiki/Phorge
phorge phabricator
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Don't show archived projects by default in policy control

Summary:
When filling in filler projects, only select active ones.

Also use a slightly more modern method signature.

Test Plan: Disabled a project, saw it vanish from the control.

Reviewers: chad

Reviewed By: chad

Differential Revision: https://secure.phabricator.com/D15199

+21 -1
+4 -1
src/applications/people/controller/PhabricatorPeopleProfileViewController.php
··· 130 130 ->setViewer($viewer) 131 131 ->withMemberPHIDs(array($user->getPHID())) 132 132 ->needImages(true) 133 - ->withStatus(PhabricatorProjectQuery::STATUS_OPEN) 133 + ->withStatuses( 134 + array( 135 + PhabricatorProjectStatus::STATUS_ACTIVE, 136 + )) 134 137 ->execute(); 135 138 136 139 $header = id(new PHUIHeaderView())
+4
src/applications/policy/query/PhabricatorPolicyQuery.php
··· 230 230 ->setViewer($viewer) 231 231 ->withMemberPHIDs(array($viewer->getPHID())) 232 232 ->withIsMilestone(false) 233 + ->withStatuses( 234 + array( 235 + PhabricatorProjectStatus::STATUS_ACTIVE, 236 + )) 233 237 ->setLimit($default_limit) 234 238 ->execute(); 235 239 $default_projects = mpull($default_projects, null, 'getPHID');
+13
src/applications/project/query/PhabricatorProjectQuery.php
··· 27 27 const STATUS_CLOSED = 'status-closed'; 28 28 const STATUS_ACTIVE = 'status-active'; 29 29 const STATUS_ARCHIVED = 'status-archived'; 30 + private $statuses; 30 31 31 32 private $needSlugs; 32 33 private $needMembers; ··· 46 47 47 48 public function withStatus($status) { 48 49 $this->status = $status; 50 + return $this; 51 + } 52 + 53 + public function withStatuses(array $statuses) { 54 + $this->statuses = $statuses; 49 55 return $this; 50 56 } 51 57 ··· 385 391 $conn, 386 392 'status IN (%Ld)', 387 393 $filter); 394 + } 395 + 396 + if ($this->statuses !== null) { 397 + $where[] = qsprintf( 398 + $conn, 399 + 'status IN (%Ls)', 400 + $this->statuses); 388 401 } 389 402 390 403 if ($this->ids !== null) {