1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2025-02-01 01:18:22 +01:00

Don't show "archived" projects in typeaheads

Summary: Remove these from typeaheads, since "archive" basically means "delete".

Test Plan: Tried to typeahead an archived project.

Reviewers: btrahan, skrul

Reviewed By: skrul

CC: aran, epriestley

Differential Revision: https://secure.phabricator.com/D1872
This commit is contained in:
epriestley 2012-03-12 21:07:40 -07:00
parent 4c147b496c
commit 08775ea366
2 changed files with 4 additions and 1 deletions

View file

@ -146,7 +146,9 @@ final class PhabricatorTypeaheadCommonDatasourceController
}
if ($need_projs) {
$projs = id(new PhabricatorProject())->loadAll();
$projs = id(new PhabricatorProject())->loadAllWhere(
'status != %d',
PhabricatorProjectStatus::STATUS_ARCHIVED);
foreach ($projs as $proj) {
$data[] = array(
$proj->getName(),

View file

@ -11,6 +11,7 @@ phutil_require_module('phabricator', 'applications/maniphest/constants/owner');
phutil_require_module('phabricator', 'applications/metamta/storage/mailinglist');
phutil_require_module('phabricator', 'applications/owners/storage/package');
phutil_require_module('phabricator', 'applications/people/storage/user');
phutil_require_module('phabricator', 'applications/project/constants/status');
phutil_require_module('phabricator', 'applications/project/storage/project');
phutil_require_module('phabricator', 'applications/repository/storage/arcanistproject');
phutil_require_module('phabricator', 'applications/repository/storage/repository');