Remove Controller->getHandle() and Controller->loadHandles()
Summary: Ref T7689. Modernize all callsites of these methods. Test Plan: - Poked at dashboards. - Pretty sure this code is technically unreachable right now. - Viewed commit; viewed "Audit Status". - Viewed a fund; viewed "Payable to"; viewed "Owner". - Viewed herald rules; viewed "Author"; viewed "Applies To". - Viewed a Legalpad document; viewed "Contributors". - Viewed Phame post list; viewed blog; viewed post (viewed "Blog", viewed "Blogger"). - Viewed a macro; viewed "Audio". - Viewed a Phriction page; viewed "Last Author". - Viewed a Ponder question; viewed "Author". - Viewed a Ponder answer; viewed header. - Behavior changed very slightly here; whatevs. - Viewed a Countdown; viewed "Author". Reviewers: btrahan Reviewed By: btrahan Subscribers: epriestley Maniphest Tasks: T7689 Differential Revision: https://secure.phabricator.com/D12210
This commit is contained in:
@@ -1021,9 +1021,7 @@ final class DiffusionCommitController extends DiffusionController {
|
||||
|
||||
private function renderAuditStatusView(array $audit_requests) {
|
||||
assert_instances_of($audit_requests, 'PhabricatorRepositoryAuditRequest');
|
||||
|
||||
$phids = mpull($audit_requests, 'getAuditorPHID');
|
||||
$this->loadHandles($phids);
|
||||
$viewer = $this->getViewer();
|
||||
|
||||
$authority_map = array_fill_keys($this->auditAuthorityPHIDs, true);
|
||||
|
||||
@@ -1043,7 +1041,7 @@ final class DiffusionCommitController extends DiffusionController {
|
||||
$item->setNote($note);
|
||||
|
||||
$auditor_phid = $request->getAuditorPHID();
|
||||
$target = $this->getHandle($auditor_phid)->renderLink();
|
||||
$target = $viewer->renderHandle($auditor_phid);
|
||||
$item->setTarget($target);
|
||||
|
||||
if (isset($authority_map[$auditor_phid])) {
|
||||
|
||||
@@ -70,9 +70,6 @@ final class DiffusionPushEventViewController
|
||||
|
||||
private function buildPropertyList(PhabricatorRepositoryPushEvent $event) {
|
||||
$viewer = $this->getRequest()->getUser();
|
||||
|
||||
$this->loadHandles(array($event->getPusherPHID()));
|
||||
|
||||
$view = new PHUIPropertyListView();
|
||||
|
||||
$view->addProperty(
|
||||
@@ -81,7 +78,7 @@ final class DiffusionPushEventViewController
|
||||
|
||||
$view->addProperty(
|
||||
pht('Pushed By'),
|
||||
$this->getHandle($event->getPusherPHID())->renderLink());
|
||||
$viewer->renderHandle($event->getPusherPHID()));
|
||||
|
||||
$view->addProperty(
|
||||
pht('Pushed Via'),
|
||||
|
||||
Reference in New Issue
Block a user