mirror of
https://we.phorge.it/source/phorge.git
synced 2024-11-27 01:02:42 +01:00
Hack-patch for missing highlights in Audit
Summary: When I swapped the views, I accidentally removed some controller -> view -> controller logic which is used to figure out which packages are highlighted. This code is a mess, but fix the feature for now and we can clean it up later. Test Plan: {F56335} Reviewers: wez, btrahan Reviewed By: btrahan CC: aran Differential Revision: https://secure.phabricator.com/D6835
This commit is contained in:
parent
bd729119fc
commit
9eb36db1d7
1 changed files with 12 additions and 2 deletions
|
@ -140,11 +140,21 @@ final class DiffusionCommitController extends DiffusionController {
|
|||
|
||||
$content[] = $this->buildMergesTable($commit);
|
||||
|
||||
// TODO: This is silly, but the logic to figure out which audits are
|
||||
// highlighted currently lives in PhabricatorAuditListView. Refactor this
|
||||
// to be less goofy.
|
||||
$highlighted_audits = id(new PhabricatorAuditListView())
|
||||
->setAudits($audit_requests)
|
||||
->setAuthorityPHIDs($this->auditAuthorityPHIDs)
|
||||
->setUser($user)
|
||||
->setCommits(array($commit->getPHID() => $commit))
|
||||
->getHighlightedAudits();
|
||||
|
||||
$owners_paths = array();
|
||||
if ($this->highlightedAudits) {
|
||||
if ($highlighted_audits) {
|
||||
$packages = id(new PhabricatorOwnersPackage())->loadAllWhere(
|
||||
'phid IN (%Ls)',
|
||||
mpull($this->highlightedAudits, 'getAuditorPHID'));
|
||||
mpull($highlighted_audits, 'getAuditorPHID'));
|
||||
if ($packages) {
|
||||
$owners_paths = id(new PhabricatorOwnersPath())->loadAllWhere(
|
||||
'repositoryPHID = %s AND packageID IN (%Ld)',
|
||||
|
|
Loading…
Reference in a new issue