mirror of
https://we.phorge.it/source/phorge.git
synced 2024-11-26 08:42:41 +01:00
Fix exception when viewing Owners packages owned by projects you are a member of
Summary: Fixes T3188. See that task for details. Test Plan: Viewed packages with and without project membership; no more exception. Reviewers: btrahan, chad Reviewed By: btrahan CC: aran Maniphest Tasks: T3188 Differential Revision: https://secure.phabricator.com/D5918
This commit is contained in:
parent
df6a66f577
commit
bc6d785b51
1 changed files with 11 additions and 7 deletions
|
@ -115,13 +115,17 @@ final class PhabricatorOwnersListController
|
|||
->withStatus(PhabricatorProjectQuery::STATUS_ANY)
|
||||
->execute();
|
||||
$owner_phids = mpull($projects, 'getPHID');
|
||||
$data = queryfx_all(
|
||||
$package->establishConnection('r'),
|
||||
'SELECT p.* FROM %T p JOIN %T o ON p.id = o.packageID
|
||||
WHERE o.userPHID IN (%Ls) GROUP BY p.id',
|
||||
$package->getTableName(),
|
||||
$owner->getTableName(),
|
||||
$owner_phids);
|
||||
if ($owner_phids) {
|
||||
$data = queryfx_all(
|
||||
$package->establishConnection('r'),
|
||||
'SELECT p.* FROM %T p JOIN %T o ON p.id = o.packageID
|
||||
WHERE o.userPHID IN (%Ls) GROUP BY p.id',
|
||||
$package->getTableName(),
|
||||
$owner->getTableName(),
|
||||
$owner_phids);
|
||||
} else {
|
||||
$data = array();
|
||||
}
|
||||
$packages = $package->loadAllFromArray($data);
|
||||
|
||||
$header = 'Owned Packages';
|
||||
|
|
Loading…
Reference in a new issue