From 9643e3b244e3ed3bded849268c16372f8fb6c049 Mon Sep 17 00:00:00 2001 From: Chad Little Date: Mon, 27 Jul 2015 09:12:35 -0700 Subject: [PATCH] Update Facts for handleRequest Summary: Updated Facts Controllers Test Plan: Viewed Facts Reviewers: epriestley Reviewed By: epriestley Subscribers: epriestley, Korvin Differential Revision: https://secure.phabricator.com/D13733 --- .../controller/PhabricatorFactChartController.php | 5 ++--- .../fact/controller/PhabricatorFactHomeController.php | 11 +++++------ 2 files changed, 7 insertions(+), 9 deletions(-) diff --git a/src/applications/fact/controller/PhabricatorFactChartController.php b/src/applications/fact/controller/PhabricatorFactChartController.php index 92718f47f8..d6f3bc0c43 100644 --- a/src/applications/fact/controller/PhabricatorFactChartController.php +++ b/src/applications/fact/controller/PhabricatorFactChartController.php @@ -2,9 +2,8 @@ final class PhabricatorFactChartController extends PhabricatorFactController { - public function processRequest() { - $request = $this->getRequest(); - $user = $request->getUser(); + public function handleRequest(AphrontRequest $request) { + $viewer = $request->getViewer(); $table = new PhabricatorFactRaw(); $conn_r = $table->establishConnection('r'); diff --git a/src/applications/fact/controller/PhabricatorFactHomeController.php b/src/applications/fact/controller/PhabricatorFactHomeController.php index b0e24cb79f..8e5c9511eb 100644 --- a/src/applications/fact/controller/PhabricatorFactHomeController.php +++ b/src/applications/fact/controller/PhabricatorFactHomeController.php @@ -6,9 +6,8 @@ final class PhabricatorFactHomeController extends PhabricatorFactController { return true; } - public function processRequest() { - $request = $this->getRequest(); - $user = $request->getUser(); + public function handleRequest(AphrontRequest $request) { + $viewer = $request->getViewer(); if ($request->isFormPost()) { $uri = new PhutilURI('/fact/chart/'); @@ -34,7 +33,7 @@ final class PhabricatorFactHomeController extends PhabricatorFactController { $spec = $specs[$fact->getFactType()]; $name = $spec->getName(); - $value = $spec->formatValueForDisplay($user, $fact->getValueX()); + $value = $spec->formatValueForDisplay($viewer, $fact->getValueX()); $rows[] = array($name, $value); } @@ -73,7 +72,7 @@ final class PhabricatorFactHomeController extends PhabricatorFactController { private function buildChartForm() { $request = $this->getRequest(); - $user = $request->getUser(); + $viewer = $request->getUser(); $table = new PhabricatorFactRaw(); $conn_r = $table->establishConnection('r'); @@ -106,7 +105,7 @@ final class PhabricatorFactHomeController extends PhabricatorFactController { } $form = id(new AphrontFormView()) - ->setUser($user) + ->setUser($viewer) ->appendChild( id(new AphrontFormSelectControl()) ->setLabel(pht('Y-Axis'))