Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F2895219
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Award Token
Flag For Later
Advanced/Developer...
View Handle
View Hovercard
Size
2 KB
Referenced Files
None
Subscribers
None
View Options
diff --git a/src/applications/phpast/controller/PhabricatorXHPASTViewRunController.php b/src/applications/phpast/controller/PhabricatorXHPASTViewRunController.php
index 5e03fe90a9..ee0d76319e 100644
--- a/src/applications/phpast/controller/PhabricatorXHPASTViewRunController.php
+++ b/src/applications/phpast/controller/PhabricatorXHPASTViewRunController.php
@@ -1,58 +1,58 @@
<?php
final class PhabricatorXHPASTViewRunController
extends PhabricatorXHPASTViewController {
public function processRequest() {
$request = $this->getRequest();
$user = $request->getUser();
if ($request->isFormPost()) {
$source = $request->getStr('source');
$future = xhpast_get_parser_future($source);
$resolved = $future->resolve();
// This is just to let it throw exceptions if stuff is broken.
$parse_tree = XHPASTTree::newFromDataAndResolvedExecFuture(
$source,
$resolved);
list($err, $stdout, $stderr) = $resolved;
$storage_tree = new PhabricatorXHPASTViewParseTree();
$storage_tree->setInput($source);
$storage_tree->setStdout($stdout);
$storage_tree->setAuthorPHID($user->getPHID());
$storage_tree->save();
return id(new AphrontRedirectResponse())
->setURI('/xhpast/view/'.$storage_tree->getID().'/');
}
$form = id(new AphrontFormView())
->setUser($user)
->appendChild(
id(new AphrontFormTextAreaControl())
->setLabel('Source')
->setName('source')
->setValue("<?php\n\n")
->setHeight(AphrontFormTextAreaControl::HEIGHT_VERY_TALL))
->appendChild(
id(new AphrontFormSubmitControl())
->setValue('Parse'));
- $panel = new AphrontPanelView();
- $panel->setHeader('Generate XHP AST');
- $panel->setWidth(AphrontPanelView::WIDTH_WIDE);
- $panel->appendChild($form);
+ $form_box = id(new PHUIFormBoxView())
+ ->setHeaderText(pht('Generate XHP AST'))
+ ->setForm($form);
- return $this->buildStandardPageResponse(
- $panel,
+ return $this->buildApplicationPage(
+ $form_box,
array(
- 'title' => 'XHPAST View',
+ 'title' => pht('XHPAST View'),
+ 'device' => true,
));
}
}
File Metadata
Details
Attached
Mime Type
text/x-diff
Expires
Jan 19 2025, 21:07 (6 w, 1 d ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
1128763
Default Alt Text
(2 KB)
Attached To
Mode
rP Phorge
Attached
Detach File
Event Timeline
Log In to Comment