1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-12-25 06:50:55 +01:00

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
This commit is contained in:
Chad Little 2015-07-27 09:12:35 -07:00
parent 564aa2c4ba
commit 9643e3b244
2 changed files with 7 additions and 9 deletions

View file

@ -2,9 +2,8 @@
final class PhabricatorFactChartController extends PhabricatorFactController { final class PhabricatorFactChartController extends PhabricatorFactController {
public function processRequest() { public function handleRequest(AphrontRequest $request) {
$request = $this->getRequest(); $viewer = $request->getViewer();
$user = $request->getUser();
$table = new PhabricatorFactRaw(); $table = new PhabricatorFactRaw();
$conn_r = $table->establishConnection('r'); $conn_r = $table->establishConnection('r');

View file

@ -6,9 +6,8 @@ final class PhabricatorFactHomeController extends PhabricatorFactController {
return true; return true;
} }
public function processRequest() { public function handleRequest(AphrontRequest $request) {
$request = $this->getRequest(); $viewer = $request->getViewer();
$user = $request->getUser();
if ($request->isFormPost()) { if ($request->isFormPost()) {
$uri = new PhutilURI('/fact/chart/'); $uri = new PhutilURI('/fact/chart/');
@ -34,7 +33,7 @@ final class PhabricatorFactHomeController extends PhabricatorFactController {
$spec = $specs[$fact->getFactType()]; $spec = $specs[$fact->getFactType()];
$name = $spec->getName(); $name = $spec->getName();
$value = $spec->formatValueForDisplay($user, $fact->getValueX()); $value = $spec->formatValueForDisplay($viewer, $fact->getValueX());
$rows[] = array($name, $value); $rows[] = array($name, $value);
} }
@ -73,7 +72,7 @@ final class PhabricatorFactHomeController extends PhabricatorFactController {
private function buildChartForm() { private function buildChartForm() {
$request = $this->getRequest(); $request = $this->getRequest();
$user = $request->getUser(); $viewer = $request->getUser();
$table = new PhabricatorFactRaw(); $table = new PhabricatorFactRaw();
$conn_r = $table->establishConnection('r'); $conn_r = $table->establishConnection('r');
@ -106,7 +105,7 @@ final class PhabricatorFactHomeController extends PhabricatorFactController {
} }
$form = id(new AphrontFormView()) $form = id(new AphrontFormView())
->setUser($user) ->setUser($viewer)
->appendChild( ->appendChild(
id(new AphrontFormSelectControl()) id(new AphrontFormSelectControl())
->setLabel(pht('Y-Axis')) ->setLabel(pht('Y-Axis'))