1
0
Fork 0
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:
epriestley 2013-08-28 16:32:40 -07:00
parent bd729119fc
commit 9eb36db1d7

View file

@ -140,11 +140,21 @@ final class DiffusionCommitController extends DiffusionController {
$content[] = $this->buildMergesTable($commit); $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(); $owners_paths = array();
if ($this->highlightedAudits) { if ($highlighted_audits) {
$packages = id(new PhabricatorOwnersPackage())->loadAllWhere( $packages = id(new PhabricatorOwnersPackage())->loadAllWhere(
'phid IN (%Ls)', 'phid IN (%Ls)',
mpull($this->highlightedAudits, 'getAuditorPHID')); mpull($highlighted_audits, 'getAuditorPHID'));
if ($packages) { if ($packages) {
$owners_paths = id(new PhabricatorOwnersPath())->loadAllWhere( $owners_paths = id(new PhabricatorOwnersPath())->loadAllWhere(
'repositoryPHID = %s AND packageID IN (%Ld)', 'repositoryPHID = %s AND packageID IN (%Ld)',