1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-11-23 15:22:41 +01:00

Update XHPhast for handleRequest

Summary: Updates XHPhast

Test Plan: Ran a few queries

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: epriestley, Korvin

Differential Revision: https://secure.phabricator.com/D13776
This commit is contained in:
Chad Little 2015-08-04 09:33:13 -07:00
parent f5be68c59c
commit ec7a0837d5
6 changed files with 11 additions and 25 deletions

View file

@ -3,18 +3,12 @@
final class PhabricatorXHPASTViewFrameController
extends PhabricatorXHPASTViewController {
private $id;
public function shouldAllowPublic() {
return true;
}
public function willProcessRequest(array $data) {
$this->id = $data['id'];
}
public function processRequest() {
$id = $this->id;
public function handleRequest(AphrontRequest $request) {
$id = $request->getURIData('id');
return $this->buildStandardPageResponse(
phutil_tag(

View file

@ -3,18 +3,12 @@
final class PhabricatorXHPASTViewFramesetController
extends PhabricatorXHPASTViewController {
private $id;
public function shouldAllowPublic() {
return true;
}
public function willProcessRequest(array $data) {
$this->id = $data['id'];
}
public function processRequest() {
$id = $this->id;
public function handleRequest(AphrontRequest $request) {
$id = $request->getURIData('id');
$response = new AphrontWebpageResponse();
$response->setFrameable(true);

View file

@ -3,7 +3,7 @@
final class PhabricatorXHPASTViewInputController
extends PhabricatorXHPASTViewPanelController {
public function processRequest() {
public function handleRequest(AphrontRequest $request) {
$input = $this->getStorageTree()->getInput();
return $this->buildXHPASTViewPanelResponse($input);
}

View file

@ -3,10 +3,8 @@
final class PhabricatorXHPASTViewRunController
extends PhabricatorXHPASTViewController {
public function processRequest() {
$request = $this->getRequest();
$user = $request->getUser();
public function handleRequest(AphrontRequest $request) {
$viewer = $this->getViewer();
if ($request->isFormPost()) {
$source = $request->getStr('source');
@ -24,7 +22,7 @@ final class PhabricatorXHPASTViewRunController
$storage_tree = new PhabricatorXHPASTViewParseTree();
$storage_tree->setInput($source);
$storage_tree->setStdout($stdout);
$storage_tree->setAuthorPHID($user->getPHID());
$storage_tree->setAuthorPHID($viewer->getPHID());
$storage_tree->save();
return id(new AphrontRedirectResponse())
@ -32,7 +30,7 @@ final class PhabricatorXHPASTViewRunController
}
$form = id(new AphrontFormView())
->setUser($user)
->setUser($viewer)
->appendChild(
id(new AphrontFormTextAreaControl())
->setLabel(pht('Source'))

View file

@ -3,7 +3,7 @@
final class PhabricatorXHPASTViewStreamController
extends PhabricatorXHPASTViewPanelController {
public function processRequest() {
public function handleRequest(AphrontRequest $request) {
$storage = $this->getStorageTree();
$input = $storage->getInput();
$stdout = $storage->getStdout();

View file

@ -7,7 +7,7 @@ final class PhabricatorXHPASTViewTreeController
return true;
}
public function processRequest() {
public function handleRequest(AphrontRequest $request) {
$storage = $this->getStorageTree();
$input = $storage->getInput();
$stdout = $storage->getStdout();