@recaptime-dev's working patches + fork for Phorge, a community fork of Phabricator. (Upstream dev and stable branches are at upstream/main and upstream/stable respectively.) hq.recaptime.dev/wiki/Phorge
phorge phabricator
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Update XHProf for handleRequest

Summary: Updates XHProf for handleRequest

Test Plan: Use XHProf

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: epriestley, Korvin

Maniphest Tasks: T8628

Differential Revision: https://secure.phabricator.com/D13770

+11 -19
+3 -9
src/applications/xhprof/controller/PhabricatorXHProfProfileController.php
··· 3 3 final class PhabricatorXHProfProfileController 4 4 extends PhabricatorXHProfController { 5 5 6 - private $phid; 7 - 8 6 public function shouldAllowPublic() { 9 7 return true; 10 8 } 11 9 12 - public function willProcessRequest(array $data) { 13 - $this->phid = $data['phid']; 14 - } 15 - 16 - public function processRequest() { 17 - $request = $this->getRequest(); 10 + public function handleRequest(AphrontRequest $request) { 11 + $phid = $request->getURIData('phid'); 18 12 19 13 $file = id(new PhabricatorFileQuery()) 20 14 ->setViewer($request->getUser()) 21 - ->withPHIDs(array($this->phid)) 15 + ->withPHIDs(array($phid)) 22 16 ->executeOne(); 23 17 if (!$file) { 24 18 return new Aphront404Response();
+8 -10
src/applications/xhprof/controller/PhabricatorXHProfSampleListController.php
··· 3 3 final class PhabricatorXHProfSampleListController 4 4 extends PhabricatorXHProfController { 5 5 6 - private $view; 7 - 8 6 public function shouldAllowPublic() { 9 7 return true; 10 8 } 11 9 12 - public function willProcessRequest(array $data) { 13 - $this->view = idx($data, 'view', 'all'); 14 - } 10 + public function handleRequest(AphrontRequest $request) { 11 + $viewer = $request->getViewer(); 12 + $view = $request->getURIData('view'); 15 13 16 - public function processRequest() { 17 - $request = $this->getRequest(); 18 - $user = $request->getUser(); 14 + if (!$view) { 15 + $view = 'all'; 16 + } 19 17 20 18 $pager = new PHUIPagerView(); 21 19 $pager->setOffset($request->getInt('page')); 22 20 23 - switch ($this->view) { 21 + switch ($view) { 24 22 case 'sampled': 25 23 $clause = 'sampleRate > 0'; 26 24 $show_type = false; ··· 78 76 79 77 $item->addIcon( 80 78 'none', 81 - phabricator_datetime($sample->getDateCreated(), $user)); 79 + phabricator_datetime($sample->getDateCreated(), $viewer)); 82 80 83 81 $list->addItem($item); 84 82 }