Page MenuHomePhabricator

D19747.diff
No OneTemporary

D19747.diff

diff --git a/src/applications/metamta/typeahead/PhabricatorMetaMTAMailableFunctionDatasource.php b/src/applications/metamta/typeahead/PhabricatorMetaMTAMailableFunctionDatasource.php
--- a/src/applications/metamta/typeahead/PhabricatorMetaMTAMailableFunctionDatasource.php
+++ b/src/applications/metamta/typeahead/PhabricatorMetaMTAMailableFunctionDatasource.php
@@ -23,6 +23,7 @@
new PhabricatorProjectMembersDatasource(),
new PhabricatorProjectDatasource(),
new PhabricatorOwnersPackageDatasource(),
+ new PhabricatorOwnersPackageOwnerDatasource(),
);
}
diff --git a/src/applications/owners/typeahead/PhabricatorOwnersPackageOwnerDatasource.php b/src/applications/owners/typeahead/PhabricatorOwnersPackageOwnerDatasource.php
--- a/src/applications/owners/typeahead/PhabricatorOwnersPackageOwnerDatasource.php
+++ b/src/applications/owners/typeahead/PhabricatorOwnersPackageOwnerDatasource.php
@@ -27,7 +27,7 @@
'packages' => array(
'name' => pht('Packages: ...'),
'arguments' => pht('owner'),
- 'summary' => pht("Find results in any of an owner's projects."),
+ 'summary' => pht("Find results in any of an owner's packages."),
'description' => pht(
"This function allows you to find results associated with any ".
"of the packages a specified user or project is an owner of. ".
@@ -61,18 +61,21 @@
$phids = $this->resolvePHIDs($phids);
- $user_phids = array();
+ $owner_phids = array();
foreach ($phids as $key => $phid) {
- if (phid_get_type($phid) == PhabricatorPeopleUserPHIDType::TYPECONST) {
- $user_phids[] = $phid;
- unset($phids[$key]);
+ switch (phid_get_type($phid)) {
+ case PhabricatorPeopleUserPHIDType::TYPECONST:
+ case PhabricatorProjectProjectPHIDType::TYPECONST:
+ $owner_phids[] = $phid;
+ unset($phids[$key]);
+ break;
}
}
- if ($user_phids) {
+ if ($owner_phids) {
$packages = id(new PhabricatorOwnersPackageQuery())
->setViewer($this->getViewer())
- ->withOwnerPHIDs($user_phids)
+ ->withOwnerPHIDs($owner_phids)
->execute();
foreach ($packages as $package) {
$phids[] = $package->getPHID();
@@ -116,8 +119,13 @@
$usernames = array();
foreach ($phids as $key => $phid) {
- if (phid_get_type($phid) != PhabricatorPeopleUserPHIDType::TYPECONST) {
- $usernames[$key] = $phid;
+ switch (phid_get_type($phid)) {
+ case PhabricatorPeopleUserPHIDType::TYPECONST:
+ case PhabricatorProjectProjectPHIDType::TYPECONST:
+ break;
+ default:
+ $usernames[$key] = $phid;
+ break;
}
}

File Metadata

Mime Type
text/plain
Expires
Thu, May 16, 7:50 PM (2 w, 1 d ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
6281295
Default Alt Text
D19747.diff (2 KB)

Event Timeline