Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F13964562
D13770.id.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
2 KB
Referenced Files
None
Subscribers
None
D13770.id.diff
View Options
diff --git a/src/applications/xhprof/controller/PhabricatorXHProfProfileController.php b/src/applications/xhprof/controller/PhabricatorXHProfProfileController.php
--- a/src/applications/xhprof/controller/PhabricatorXHProfProfileController.php
+++ b/src/applications/xhprof/controller/PhabricatorXHProfProfileController.php
@@ -3,22 +3,16 @@
final class PhabricatorXHProfProfileController
extends PhabricatorXHProfController {
- private $phid;
-
public function shouldAllowPublic() {
return true;
}
- public function willProcessRequest(array $data) {
- $this->phid = $data['phid'];
- }
-
- public function processRequest() {
- $request = $this->getRequest();
+ public function handleRequest(AphrontRequest $request) {
+ $phid = $request->getURIData('phid');
$file = id(new PhabricatorFileQuery())
->setViewer($request->getUser())
- ->withPHIDs(array($this->phid))
+ ->withPHIDs(array($phid))
->executeOne();
if (!$file) {
return new Aphront404Response();
diff --git a/src/applications/xhprof/controller/PhabricatorXHProfSampleListController.php b/src/applications/xhprof/controller/PhabricatorXHProfSampleListController.php
--- a/src/applications/xhprof/controller/PhabricatorXHProfSampleListController.php
+++ b/src/applications/xhprof/controller/PhabricatorXHProfSampleListController.php
@@ -3,24 +3,22 @@
final class PhabricatorXHProfSampleListController
extends PhabricatorXHProfController {
- private $view;
-
public function shouldAllowPublic() {
return true;
}
- public function willProcessRequest(array $data) {
- $this->view = idx($data, 'view', 'all');
- }
+ public function handleRequest(AphrontRequest $request) {
+ $viewer = $request->getViewer();
+ $view = $request->getURIData('view');
- public function processRequest() {
- $request = $this->getRequest();
- $user = $request->getUser();
+ if (!$view) {
+ $view = 'all';
+ }
$pager = new PHUIPagerView();
$pager->setOffset($request->getInt('page'));
- switch ($this->view) {
+ switch ($view) {
case 'sampled':
$clause = 'sampleRate > 0';
$show_type = false;
@@ -78,7 +76,7 @@
$item->addIcon(
'none',
- phabricator_datetime($sample->getDateCreated(), $user));
+ phabricator_datetime($sample->getDateCreated(), $viewer));
$list->addItem($item);
}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Oct 16 2024, 9:04 PM (4 w, 6 d ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
6717888
Default Alt Text
D13770.id.diff (2 KB)
Attached To
Mode
D13770: Update XHProf for handleRequest
Attached
Detach File
Event Timeline
Log In to Comment