@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.

Decouple some aspects of request routing and construction

Summary:
Ref T5702. This is a forward-looking change which provides some very broad API improvements but does not implement them. In particular:

- Controllers no longer require `$request` to construct. This is mostly for T5702, directly, but simplifies things in general. Instead, we call `setRequest()` before using a controller. Only a small number of sites activate controllers, so this is less code overall, and more consistent with most constructors not having any parameters or effects.
- `$request` now offers `getURIData($key, ...)`. This is an alternate way of accessing `$data` which is currently only available on `willProcessRequest(array $data)`. Almost all controllers which implement this method do so in order to read one or two things out of the URI data. Instead, let them just read this data directly when processing the request.
- Introduce `handleRequest(AphrontRequest $request)` and deprecate (very softly) `processRequest()`. The majority of `processRequest()` calls begin `$request = $this->getRequest()`, which is avoided with the more practical signature.
- Provide `getViewer()` on `$request`, and a convenience `getViewer()` on `$controller`. This fixes `$viewer = $request->getUser();` into `$viewer = $request->getViewer();`, and converts the `$request + $viewer` two-liner into a single `$this->getViewer()`.

Test Plan:
- Browsed around in general.
- Hit special controllers (redirect, 404).
- Hit AuditList controller (uses new style).

Reviewers: btrahan

Reviewed By: btrahan

Subscribers: epriestley

Maniphest Tasks: T5702

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

+111 -117
+23 -3
src/aphront/AphrontController.php
··· 28 28 return $response; 29 29 } 30 30 31 - abstract public function processRequest(); 31 + public function handleRequest(AphrontRequest $request) { 32 + if (method_exists($this, 'processRequest')) { 33 + return $this->processRequest(); 34 + } 35 + 36 + throw new PhutilMethodNotImplementedException( 37 + pht( 38 + 'Controllers must implement either handleRequest() (recommended) '. 39 + 'or processRequest() (deprecated).')); 40 + } 32 41 33 - final public function __construct(AphrontRequest $request) { 42 + final public function setRequest(AphrontRequest $request) { 34 43 $this->request = $request; 44 + return $this; 35 45 } 36 46 37 47 final public function getRequest() { 48 + if (!$this->request) { 49 + throw new Exception(pht('Call setRequest() before getRequest()!')); 50 + } 38 51 return $this->request; 39 52 } 40 53 54 + final public function getViewer() { 55 + return $this->getRequest()->getViewer(); 56 + } 57 + 41 58 final public function delegateToController(AphrontController $controller) { 59 + $request = $this->getRequest(); 60 + 42 61 $controller->setDelegatingController($this); 62 + $controller->setRequest($request); 43 63 44 64 $application = $this->getCurrentApplication(); 45 65 if ($application) { 46 66 $controller->setCurrentApplication($application); 47 67 } 48 68 49 - return $controller->processRequest(); 69 + return $controller->handleRequest($request); 50 70 } 51 71 52 72 final public function setCurrentApplication(
+18
src/aphront/AphrontRequest.php
··· 25 25 private $requestData; 26 26 private $user; 27 27 private $applicationConfiguration; 28 + private $uriData; 28 29 29 30 final public function __construct($host, $path) { 30 31 $this->host = $host; 31 32 $this->path = $path; 33 + } 34 + 35 + final public function setURIMap(array $uri_data) { 36 + $this->uriData = $uri_data; 37 + return $this; 38 + } 39 + 40 + final public function getURIMap() { 41 + return $this->uriData; 42 + } 43 + 44 + final public function getURIData($key, $default = null) { 45 + return idx($this->uriData, $key, $default); 32 46 } 33 47 34 48 final public function setApplicationConfiguration( ··· 473 487 } 474 488 475 489 final public function getUser() { 490 + return $this->user; 491 + } 492 + 493 + final public function getViewer() { 476 494 return $this->user; 477 495 } 478 496
+1 -1
src/aphront/configuration/AphrontApplicationConfiguration.php
··· 239 239 240 240 $request = $this->getRequest(); 241 241 242 - $controller = newv($controller_class, array($request)); 242 + $controller = newv($controller_class, array()); 243 243 if ($current_application) { 244 244 $controller->setCurrentApplication($current_application); 245 245 }
+5 -4
src/aphront/configuration/AphrontDefaultApplicationConfiguration.php
··· 152 152 // 153 153 // Possibly we should add a header here like "you need to login to see 154 154 // the thing you are trying to look at". 155 - $login_controller = new PhabricatorAuthStartController($request); 155 + $login_controller = new PhabricatorAuthStartController(); 156 + $login_controller->setRequest($request); 156 157 157 158 $auth_app_class = 'PhabricatorAuthApplication'; 158 159 $auth_app = PhabricatorApplication::getByClass($auth_app_class); 159 160 $login_controller->setCurrentApplication($auth_app); 160 161 161 - return $login_controller->processRequest(); 162 + return $login_controller->handleRequest($request); 162 163 } 163 164 164 165 $list = $ex->getMoreInfo(); ··· 272 273 } 273 274 274 275 public function build404Controller() { 275 - return array(new Phabricator404Controller($this->getRequest()), array()); 276 + return array(new Phabricator404Controller(), array()); 276 277 } 277 278 278 279 public function buildRedirectController($uri, $external) { 279 280 return array( 280 - new PhabricatorRedirectController($this->getRequest()), 281 + new PhabricatorRedirectController(), 281 282 array( 282 283 'uri' => $uri, 283 284 'external' => $external,
+3 -12
src/applications/audit/controller/PhabricatorAuditListController.php
··· 3 3 final class PhabricatorAuditListController 4 4 extends PhabricatorAuditController { 5 5 6 - private $queryKey; 7 - private $name; 8 - private $filterStatus; 9 - 10 6 public function shouldAllowPublic() { 11 7 return true; 12 8 } 13 9 14 - public function willProcessRequest(array $data) { 15 - $this->queryKey = idx($data, 'queryKey'); 16 - } 17 - 18 - public function processRequest() { 19 - $request = $this->getRequest(); 20 - $controller = id(new PhabricatorApplicationSearchController($request)) 21 - ->setQueryKey($this->queryKey) 10 + public function handleRequest(AphrontRequest $request) { 11 + $controller = id(new PhabricatorApplicationSearchController()) 12 + ->setQueryKey($request->getURIData('queryKey')) 22 13 ->setSearchEngine(new PhabricatorCommitSearchEngine()) 23 14 ->setNavigation($this->buildSideNavView()); 24 15
+6 -7
src/applications/base/controller/PhabricatorController.php
··· 137 137 138 138 if ($this->shouldRequireEnabledUser()) { 139 139 if ($user->isLoggedIn() && !$user->getIsApproved()) { 140 - $controller = new PhabricatorAuthNeedsApprovalController($request); 140 + $controller = new PhabricatorAuthNeedsApprovalController(); 141 141 return $this->delegateToController($controller); 142 142 } 143 143 if ($user->getIsDisabled()) { 144 - $controller = new PhabricatorDisabledUserController($request); 144 + $controller = new PhabricatorDisabledUserController(); 145 145 return $this->delegateToController($controller); 146 146 } 147 147 } ··· 166 166 if (!$this->shouldAllowPartialSessions()) { 167 167 if ($user->hasSession() && 168 168 $user->getSession()->getIsPartial()) { 169 - $login_controller = new PhabricatorAuthFinishController($request); 169 + $login_controller = new PhabricatorAuthFinishController(); 170 170 $this->setCurrentApplication($auth_application); 171 171 return $this->delegateToController($login_controller); 172 172 } ··· 180 180 // and require MFA enrollment. 181 181 $user->updateMultiFactorEnrollment(); 182 182 if (!$user->getIsEnrolledInMultiFactor()) { 183 - $mfa_controller = new PhabricatorAuthNeedsMultiFactorController( 184 - $request); 183 + $mfa_controller = new PhabricatorAuthNeedsMultiFactorController(); 185 184 $this->setCurrentApplication($auth_application); 186 185 return $this->delegateToController($mfa_controller); 187 186 } ··· 198 197 // If this controller isn't public, and the user isn't logged in, require 199 198 // login. 200 199 if (!$allow_public && !$user->isLoggedIn()) { 201 - $login_controller = new PhabricatorAuthStartController($request); 200 + $login_controller = new PhabricatorAuthStartController(); 202 201 $this->setCurrentApplication($auth_application); 203 202 return $this->delegateToController($login_controller); 204 203 } ··· 206 205 if ($user->isLoggedIn()) { 207 206 if ($this->shouldRequireEmailVerification()) { 208 207 if (!$user->getIsEmailVerified()) { 209 - $controller = new PhabricatorMustVerifyEmailController($request); 208 + $controller = new PhabricatorMustVerifyEmailController(); 210 209 $this->setCurrentApplication($auth_application); 211 210 return $this->delegateToController($controller); 212 211 }
+2 -1
src/applications/base/controller/__tests__/PhabricatorAccessControlTestCase.php
··· 22 22 ->setApplicationConfiguration($application_configuration) 23 23 ->setRequestData(array()); 24 24 25 - $controller = new PhabricatorTestController($request); 25 + $controller = new PhabricatorTestController(); 26 + $controller->setRequest($request); 26 27 27 28 $u_public = id(new PhabricatorUser()) 28 29 ->setUsername('public');
+1 -2
src/applications/calendar/controller/PhabricatorCalendarEventListController.php
··· 14 14 } 15 15 16 16 public function processRequest() { 17 - $request = $this->getRequest(); 18 - $controller = id(new PhabricatorApplicationSearchController($request)) 17 + $controller = id(new PhabricatorApplicationSearchController()) 19 18 ->setQueryKey($this->queryKey) 20 19 ->setSearchEngine(new PhabricatorCalendarEventSearchEngine()) 21 20 ->setNavigation($this->buildSideNav());
+1 -2
src/applications/conduit/controller/PhabricatorConduitListController.php
··· 14 14 } 15 15 16 16 public function processRequest() { 17 - $request = $this->getRequest(); 18 - $controller = id(new PhabricatorApplicationSearchController($request)) 17 + $controller = id(new PhabricatorApplicationSearchController()) 19 18 ->setQueryKey($this->queryKey) 20 19 ->setSearchEngine(new PhabricatorConduitSearchEngine()) 21 20 ->setNavigation($this->buildSideNavView());
+1 -2
src/applications/countdown/controller/PhabricatorCountdownListController.php
··· 14 14 } 15 15 16 16 public function processRequest() { 17 - $request = $this->getRequest(); 18 - $controller = id(new PhabricatorApplicationSearchController($request)) 17 + $controller = id(new PhabricatorApplicationSearchController()) 19 18 ->setQueryKey($this->queryKey) 20 19 ->setSearchEngine(new PhabricatorCountdownSearchEngine()) 21 20 ->setNavigation($this->buildSideNavView());
+1 -2
src/applications/dashboard/controller/PhabricatorDashboardListController.php
··· 14 14 } 15 15 16 16 public function processRequest() { 17 - $request = $this->getRequest(); 18 - $controller = id(new PhabricatorApplicationSearchController($request)) 17 + $controller = id(new PhabricatorApplicationSearchController()) 19 18 ->setQueryKey($this->queryKey) 20 19 ->setSearchEngine(new PhabricatorDashboardSearchEngine()) 21 20 ->setNavigation($this->buildSideNavView());
+1 -2
src/applications/dashboard/controller/PhabricatorDashboardPanelListController.php
··· 14 14 } 15 15 16 16 public function processRequest() { 17 - $request = $this->getRequest(); 18 - $controller = id(new PhabricatorApplicationSearchController($request)) 17 + $controller = id(new PhabricatorApplicationSearchController()) 19 18 ->setQueryKey($this->queryKey) 20 19 ->setSearchEngine(new PhabricatorDashboardPanelSearchEngine()) 21 20 ->setNavigation($this->buildSideNavView());
+1 -2
src/applications/differential/controller/DifferentialRevisionListController.php
··· 13 13 } 14 14 15 15 public function processRequest() { 16 - $request = $this->getRequest(); 17 - $controller = id(new PhabricatorApplicationSearchController($request)) 16 + $controller = id(new PhabricatorApplicationSearchController()) 18 17 ->setQueryKey($this->queryKey) 19 18 ->setSearchEngine(new DifferentialRevisionSearchEngine()) 20 19 ->setNavigation($this->buildSideNavView());
+1 -1
src/applications/diffusion/controller/DiffusionBrowseMainController.php
··· 12 12 $grep = $request->getStr('grep'); 13 13 $find = $request->getStr('find'); 14 14 if (strlen($grep) || strlen($find)) { 15 - $controller = new DiffusionBrowseSearchController($request); 15 + $controller = new DiffusionBrowseSearchController(); 16 16 } else { 17 17 $results = DiffusionBrowseResultSet::newFromConduit( 18 18 $this->callConduitWithDiffusionRequest(
+1 -1
src/applications/diffusion/controller/DiffusionController.php
··· 23 23 // "svn checkout". If it is, we jump off into repository serving code to 24 24 // process the request. 25 25 if (DiffusionServeController::isVCSRequest($request)) { 26 - $serve_controller = id(new DiffusionServeController($request)) 26 + $serve_controller = id(new DiffusionServeController()) 27 27 ->setCurrentApplication($this->getCurrentApplication()); 28 28 return $this->delegateToController($serve_controller); 29 29 }
+1 -1
src/applications/diffusion/controller/DiffusionLintController.php
··· 12 12 $drequest = $this->diffusionRequest; 13 13 14 14 if ($request->getStr('lint') !== null) { 15 - $controller = new DiffusionLintDetailsController($request); 15 + $controller = new DiffusionLintDetailsController(); 16 16 $controller->setDiffusionRequest($drequest); 17 17 $controller->setCurrentApplication($this->getCurrentApplication()); 18 18 return $this->delegateToController($controller);
+1 -1
src/applications/diffusion/controller/DiffusionPushLogListController.php
··· 14 14 15 15 public function processRequest() { 16 16 $request = $this->getRequest(); 17 - $controller = id(new PhabricatorApplicationSearchController($request)) 17 + $controller = id(new PhabricatorApplicationSearchController()) 18 18 ->setQueryKey($this->queryKey) 19 19 ->setSearchEngine(new PhabricatorRepositoryPushLogSearchEngine()) 20 20 ->setNavigation($this->buildSideNavView());
+1 -1
src/applications/diffusion/controller/DiffusionRepositoryListController.php
··· 14 14 15 15 public function processRequest() { 16 16 $request = $this->getRequest(); 17 - $controller = id(new PhabricatorApplicationSearchController($request)) 17 + $controller = id(new PhabricatorApplicationSearchController()) 18 18 ->setQueryKey($this->queryKey) 19 19 ->setSearchEngine(new PhabricatorRepositorySearchEngine()) 20 20 ->setNavigation($this->buildSideNavView());
+1 -1
src/applications/diviner/controller/DivinerAtomListController.php
··· 14 14 15 15 public function processRequest() { 16 16 $request = $this->getRequest(); 17 - $controller = id(new PhabricatorApplicationSearchController($request)) 17 + $controller = id(new PhabricatorApplicationSearchController()) 18 18 ->setQueryKey($this->key) 19 19 ->setSearchEngine(new DivinerAtomSearchEngine()) 20 20 ->setNavigation($this->buildSideNavView());
+1 -1
src/applications/drydock/controller/DrydockBlueprintListController.php
··· 14 14 15 15 public function processRequest() { 16 16 $request = $this->getRequest(); 17 - $controller = id(new PhabricatorApplicationSearchController($request)) 17 + $controller = id(new PhabricatorApplicationSearchController()) 18 18 ->setQueryKey($this->queryKey) 19 19 ->setSearchEngine(new DrydockBlueprintSearchEngine()) 20 20 ->setNavigation($this->buildSideNavView());
+1 -2
src/applications/drydock/controller/DrydockLeaseListController.php
··· 13 13 } 14 14 15 15 public function processRequest() { 16 - $request = $this->getRequest(); 17 - $controller = id(new PhabricatorApplicationSearchController($request)) 16 + $controller = id(new PhabricatorApplicationSearchController()) 18 17 ->setQueryKey($this->queryKey) 19 18 ->setSearchEngine(new DrydockLeaseSearchEngine()) 20 19 ->setNavigation($this->buildSideNavView());
+1 -2
src/applications/drydock/controller/DrydockLogListController.php
··· 13 13 } 14 14 15 15 public function processRequest() { 16 - $request = $this->getRequest(); 17 - $controller = id(new PhabricatorApplicationSearchController($request)) 16 + $controller = id(new PhabricatorApplicationSearchController()) 18 17 ->setQueryKey($this->queryKey) 19 18 ->setSearchEngine(new DrydockLogSearchEngine()) 20 19 ->setNavigation($this->buildSideNavView());
+1 -2
src/applications/drydock/controller/DrydockResourceListController.php
··· 13 13 } 14 14 15 15 public function processRequest() { 16 - $request = $this->getRequest(); 17 - $controller = id(new PhabricatorApplicationSearchController($request)) 16 + $controller = id(new PhabricatorApplicationSearchController()) 18 17 ->setQueryKey($this->queryKey) 19 18 ->setSearchEngine(new DrydockResourceSearchEngine()) 20 19 ->setNavigation($this->buildSideNavView());
+1 -2
src/applications/feed/controller/PhabricatorFeedListController.php
··· 13 13 } 14 14 15 15 public function processRequest() { 16 - $request = $this->getRequest(); 17 - $controller = id(new PhabricatorApplicationSearchController($request)) 16 + $controller = id(new PhabricatorApplicationSearchController()) 18 17 ->setQueryKey($this->queryKey) 19 18 ->setSearchEngine(new PhabricatorFeedSearchEngine()) 20 19 ->setNavigation($this->buildSideNavView());
+1 -2
src/applications/files/controller/PhabricatorFileListController.php
··· 13 13 } 14 14 15 15 public function processRequest() { 16 - $request = $this->getRequest(); 17 - $controller = id(new PhabricatorApplicationSearchController($request)) 16 + $controller = id(new PhabricatorApplicationSearchController()) 18 17 ->setQueryKey($this->key) 19 18 ->setSearchEngine(new PhabricatorFileSearchEngine()) 20 19 ->setNavigation($this->buildSideNavView());
+1 -2
src/applications/flag/controller/PhabricatorFlagListController.php
··· 13 13 } 14 14 15 15 public function processRequest() { 16 - $request = $this->getRequest(); 17 - $controller = id(new PhabricatorApplicationSearchController($request)) 16 + $controller = id(new PhabricatorApplicationSearchController()) 18 17 ->setQueryKey($this->queryKey) 19 18 ->setSearchEngine(new PhabricatorFlagSearchEngine()) 20 19 ->setNavigation($this->buildSideNavView());
+1 -1
src/applications/fund/controller/FundBackerListController.php
··· 29 29 } 30 30 } 31 31 32 - $controller = id(new PhabricatorApplicationSearchController($request)) 32 + $controller = id(new PhabricatorApplicationSearchController()) 33 33 ->setQueryKey($this->queryKey) 34 34 ->setSearchEngine($this->getEngine()) 35 35 ->setNavigation($this->buildSideNavView());
+1 -2
src/applications/fund/controller/FundInitiativeListController.php
··· 14 14 } 15 15 16 16 public function processRequest() { 17 - $request = $this->getRequest(); 18 - $controller = id(new PhabricatorApplicationSearchController($request)) 17 + $controller = id(new PhabricatorApplicationSearchController()) 19 18 ->setQueryKey($this->queryKey) 20 19 ->setSearchEngine(new FundInitiativeSearchEngine()) 21 20 ->setNavigation($this->buildSideNavView());
+1 -2
src/applications/harbormaster/controller/HarbormasterBuildableListController.php
··· 13 13 } 14 14 15 15 public function processRequest() { 16 - $request = $this->getRequest(); 17 - $controller = id(new PhabricatorApplicationSearchController($request)) 16 + $controller = id(new PhabricatorApplicationSearchController()) 18 17 ->setQueryKey($this->queryKey) 19 18 ->setSearchEngine(new HarbormasterBuildableSearchEngine()) 20 19 ->setNavigation($this->buildSideNavView());
+1 -2
src/applications/harbormaster/controller/HarbormasterPlanListController.php
··· 13 13 } 14 14 15 15 public function processRequest() { 16 - $request = $this->getRequest(); 17 - $controller = id(new PhabricatorApplicationSearchController($request)) 16 + $controller = id(new PhabricatorApplicationSearchController()) 18 17 ->setQueryKey($this->queryKey) 19 18 ->setSearchEngine(new HarbormasterBuildPlanSearchEngine()) 20 19 ->setNavigation($this->buildSideNavView());
+1 -2
src/applications/herald/controller/HeraldRuleListController.php
··· 13 13 } 14 14 15 15 public function processRequest() { 16 - $request = $this->getRequest(); 17 - $controller = id(new PhabricatorApplicationSearchController($request)) 16 + $controller = id(new PhabricatorApplicationSearchController()) 18 17 ->setQueryKey($this->queryKey) 19 18 ->setSearchEngine(new HeraldRuleSearchEngine()) 20 19 ->setNavigation($this->buildSideNavView());
+1 -2
src/applications/herald/controller/HeraldTranscriptListController.php
··· 37 37 } 38 38 39 39 public function processRequest() { 40 - $request = $this->getRequest(); 41 - $controller = id(new PhabricatorApplicationSearchController($request)) 40 + $controller = id(new PhabricatorApplicationSearchController()) 42 41 ->setQueryKey($this->queryKey) 43 42 ->setSearchEngine(new HeraldTranscriptSearchEngine()) 44 43 ->setNavigation($this->buildSideNavView());
+1 -2
src/applications/legalpad/controller/LegalpadDocumentListController.php
··· 13 13 } 14 14 15 15 public function processRequest() { 16 - $request = $this->getRequest(); 17 - $controller = id(new PhabricatorApplicationSearchController($request)) 16 + $controller = id(new PhabricatorApplicationSearchController()) 18 17 ->setQueryKey($this->queryKey) 19 18 ->setSearchEngine(new LegalpadDocumentSearchEngine()) 20 19 ->setNavigation($this->buildSideNav());
+1 -1
src/applications/legalpad/controller/LegalpadDocumentSignatureListController.php
··· 38 38 $engine->setDocument($this->document); 39 39 } 40 40 41 - $controller = id(new PhabricatorApplicationSearchController($request)) 41 + $controller = id(new PhabricatorApplicationSearchController()) 42 42 ->setQueryKey($this->queryKey) 43 43 ->setSearchEngine($engine) 44 44 ->setNavigation($this->buildSideNav());
+1 -2
src/applications/macro/controller/PhabricatorMacroListController.php
··· 13 13 } 14 14 15 15 public function processRequest() { 16 - $request = $this->getRequest(); 17 - $controller = id(new PhabricatorApplicationSearchController($request)) 16 + $controller = id(new PhabricatorApplicationSearchController()) 18 17 ->setQueryKey($this->key) 19 18 ->setSearchEngine(new PhabricatorMacroSearchEngine()) 20 19 ->setNavigation($this->buildSideNavView());
+1 -2
src/applications/mailinglists/controller/PhabricatorMailingListsListController.php
··· 14 14 } 15 15 16 16 public function processRequest() { 17 - $request = $this->getRequest(); 18 - $controller = id(new PhabricatorApplicationSearchController($request)) 17 + $controller = id(new PhabricatorApplicationSearchController()) 19 18 ->setQueryKey($this->queryKey) 20 19 ->setSearchEngine(new PhabricatorMailingListSearchEngine()) 21 20 ->setNavigation($this->buildSideNavView());
+1 -2
src/applications/maniphest/controller/ManiphestTaskListController.php
··· 14 14 } 15 15 16 16 public function processRequest() { 17 - $request = $this->getRequest(); 18 - $controller = id(new PhabricatorApplicationSearchController($request)) 17 + $controller = id(new PhabricatorApplicationSearchController()) 19 18 ->setQueryKey($this->queryKey) 20 19 ->setSearchEngine( 21 20 id(new ManiphestTaskSearchEngine())
+1 -2
src/applications/meta/controller/PhabricatorApplicationsListController.php
··· 14 14 } 15 15 16 16 public function processRequest() { 17 - $request = $this->getRequest(); 18 - $controller = id(new PhabricatorApplicationSearchController($request)) 17 + $controller = id(new PhabricatorApplicationSearchController()) 19 18 ->setQueryKey($this->queryKey) 20 19 ->setSearchEngine(new PhabricatorAppSearchEngine()) 21 20 ->setNavigation($this->buildSideNavView());
+1 -2
src/applications/notification/controller/PhabricatorNotificationListController.php
··· 10 10 } 11 11 12 12 public function processRequest() { 13 - $request = $this->getRequest(); 14 - $controller = id(new PhabricatorApplicationSearchController($request)) 13 + $controller = id(new PhabricatorApplicationSearchController()) 15 14 ->setQueryKey($this->queryKey) 16 15 ->setSearchEngine(new PhabricatorNotificationSearchEngine()) 17 16 ->setNavigation($this->buildSideNavView());
+1 -2
src/applications/oauthserver/controller/client/PhabricatorOAuthClientListController.php
··· 14 14 } 15 15 16 16 public function processRequest() { 17 - $request = $this->getRequest(); 18 - $controller = id(new PhabricatorApplicationSearchController($request)) 17 + $controller = id(new PhabricatorApplicationSearchController()) 19 18 ->setQueryKey($this->queryKey) 20 19 ->setSearchEngine(new PhabricatorOAuthServerClientSearchEngine()) 21 20 ->setNavigation($this->buildSideNavView());
+1 -2
src/applications/passphrase/controller/PassphraseCredentialListController.php
··· 13 13 } 14 14 15 15 public function processRequest() { 16 - $request = $this->getRequest(); 17 - $controller = id(new PhabricatorApplicationSearchController($request)) 16 + $controller = id(new PhabricatorApplicationSearchController()) 18 17 ->setQueryKey($this->queryKey) 19 18 ->setSearchEngine(new PassphraseCredentialSearchEngine()) 20 19 ->setNavigation($this->buildSideNavView());
+1 -2
src/applications/paste/controller/PhabricatorPasteListController.php
··· 13 13 } 14 14 15 15 public function processRequest() { 16 - $request = $this->getRequest(); 17 - $controller = id(new PhabricatorApplicationSearchController($request)) 16 + $controller = id(new PhabricatorApplicationSearchController()) 18 17 ->setQueryKey($this->queryKey) 19 18 ->setSearchEngine(new PhabricatorPasteSearchEngine()) 20 19 ->setNavigation($this->buildSideNavView());
+1 -4
src/applications/people/controller/PhabricatorPeopleListController.php
··· 18 18 } 19 19 20 20 public function processRequest() { 21 - $request = $this->getRequest(); 22 - $viewer = $request->getUser(); 23 - 24 21 $this->requireApplicationCapability( 25 22 PeopleBrowseUserDirectoryCapability::CAPABILITY); 26 23 27 - $controller = id(new PhabricatorApplicationSearchController($request)) 24 + $controller = id(new PhabricatorApplicationSearchController()) 28 25 ->setQueryKey($this->key) 29 26 ->setSearchEngine(new PhabricatorPeopleSearchEngine()) 30 27 ->setNavigation($this->buildSideNavView());
+1 -2
src/applications/people/controller/PhabricatorPeopleLogsController.php
··· 10 10 } 11 11 12 12 public function processRequest() { 13 - $request = $this->getRequest(); 14 - $controller = id(new PhabricatorApplicationSearchController($request)) 13 + $controller = id(new PhabricatorApplicationSearchController()) 15 14 ->setQueryKey($this->queryKey) 16 15 ->setSearchEngine(new PhabricatorPeopleLogSearchEngine()) 17 16 ->setNavigation($this->buildSideNavView());
+1 -2
src/applications/pholio/controller/PholioMockListController.php
··· 13 13 } 14 14 15 15 public function processRequest() { 16 - $request = $this->getRequest(); 17 - $controller = id(new PhabricatorApplicationSearchController($request)) 16 + $controller = id(new PhabricatorApplicationSearchController()) 18 17 ->setQueryKey($this->queryKey) 19 18 ->setSearchEngine(new PholioMockSearchEngine()) 20 19 ->setNavigation($this->buildSideNavView());
+1 -1
src/applications/phortune/controller/PhortuneCartListController.php
··· 56 56 return new Aphront404Response(); 57 57 } 58 58 59 - $controller = id(new PhabricatorApplicationSearchController($request)) 59 + $controller = id(new PhabricatorApplicationSearchController()) 60 60 ->setQueryKey($this->queryKey) 61 61 ->setSearchEngine($engine) 62 62 ->setNavigation($this->buildSideNavView());
+1 -1
src/applications/phortune/controller/PhortuneChargeListController.php
··· 38 38 return new Aphront404Response(); 39 39 } 40 40 41 - $controller = id(new PhabricatorApplicationSearchController($request)) 41 + $controller = id(new PhabricatorApplicationSearchController()) 42 42 ->setQueryKey($this->queryKey) 43 43 ->setSearchEngine($engine) 44 44 ->setNavigation($this->buildSideNavView());
+1 -2
src/applications/phortune/controller/PhortuneMerchantListController.php
··· 14 14 } 15 15 16 16 public function processRequest() { 17 - $request = $this->getRequest(); 18 - $controller = id(new PhabricatorApplicationSearchController($request)) 17 + $controller = id(new PhabricatorApplicationSearchController()) 19 18 ->setQueryKey($this->queryKey) 20 19 ->setSearchEngine(new PhortuneMerchantSearchEngine()) 21 20 ->setNavigation($this->buildSideNavView());
+1 -2
src/applications/phrequent/controller/PhrequentListController.php
··· 13 13 } 14 14 15 15 public function processRequest() { 16 - $request = $this->getRequest(); 17 - $controller = id(new PhabricatorApplicationSearchController($request)) 16 + $controller = id(new PhabricatorApplicationSearchController()) 18 17 ->setQueryKey($this->queryKey) 19 18 ->setSearchEngine(new PhrequentSearchEngine()) 20 19 ->setNavigation($this->buildSideNavView());
+1 -2
src/applications/phriction/controller/PhrictionListController.php
··· 14 14 } 15 15 16 16 public function processRequest() { 17 - $request = $this->getRequest(); 18 - $controller = id(new PhabricatorApplicationSearchController($request)) 17 + $controller = id(new PhabricatorApplicationSearchController()) 19 18 ->setQueryKey($this->queryKey) 20 19 ->setSearchEngine(new PhrictionSearchEngine()) 21 20 ->setNavigation($this->buildSideNavView());
+1 -2
src/applications/ponder/controller/PonderQuestionListController.php
··· 13 13 } 14 14 15 15 public function processRequest() { 16 - $request = $this->getRequest(); 17 - $controller = id(new PhabricatorApplicationSearchController($request)) 16 + $controller = id(new PhabricatorApplicationSearchController()) 18 17 ->setQueryKey($this->queryKey) 19 18 ->setSearchEngine(new PonderQuestionSearchEngine()) 20 19 ->setNavigation($this->buildSideNavView());
+1 -2
src/applications/project/controller/PhabricatorProjectListController.php
··· 14 14 } 15 15 16 16 public function processRequest() { 17 - $request = $this->getRequest(); 18 - $controller = id(new PhabricatorApplicationSearchController($request)) 17 + $controller = id(new PhabricatorApplicationSearchController()) 19 18 ->setQueryKey($this->queryKey) 20 19 ->setSearchEngine(new PhabricatorProjectSearchEngine()) 21 20 ->setNavigation($this->buildSideNavView());
+1 -1
src/applications/releeph/controller/branch/ReleephBranchViewController.php
··· 28 28 } 29 29 $this->setBranch($branch); 30 30 31 - $controller = id(new PhabricatorApplicationSearchController($request)) 31 + $controller = id(new PhabricatorApplicationSearchController()) 32 32 ->setPreface($this->renderPreface()) 33 33 ->setQueryKey($this->queryKey) 34 34 ->setSearchEngine($this->getSearchEngine())
+1 -2
src/applications/releeph/controller/product/ReleephProductListController.php
··· 13 13 } 14 14 15 15 public function processRequest() { 16 - $request = $this->getRequest(); 17 - $controller = id(new PhabricatorApplicationSearchController($request)) 16 + $controller = id(new PhabricatorApplicationSearchController()) 18 17 ->setQueryKey($this->queryKey) 19 18 ->setSearchEngine(new ReleephProductSearchEngine()) 20 19 ->setNavigation($this->buildSideNavView());
+1 -1
src/applications/releeph/controller/product/ReleephProductViewController.php
··· 28 28 } 29 29 $this->setProduct($product); 30 30 31 - $controller = id(new PhabricatorApplicationSearchController($request)) 31 + $controller = id(new PhabricatorApplicationSearchController()) 32 32 ->setQueryKey($this->queryKey) 33 33 ->setPreface($this->renderPreface()) 34 34 ->setSearchEngine(
+1 -1
src/applications/search/controller/PhabricatorSearchController.php
··· 72 72 } 73 73 } 74 74 75 - $controller = id(new PhabricatorApplicationSearchController($request)) 75 + $controller = id(new PhabricatorApplicationSearchController()) 76 76 ->setQueryKey($this->queryKey) 77 77 ->setSearchEngine($engine) 78 78 ->setNavigation($this->buildSideNavView());
+1 -2
src/applications/slowvote/controller/PhabricatorSlowvoteListController.php
··· 14 14 } 15 15 16 16 public function processRequest() { 17 - $request = $this->getRequest(); 18 - $controller = id(new PhabricatorApplicationSearchController($request)) 17 + $controller = id(new PhabricatorApplicationSearchController()) 19 18 ->setQueryKey($this->queryKey) 20 19 ->setSearchEngine(new PhabricatorSlowvoteSearchEngine()) 21 20 ->setNavigation($this->buildSideNavView());
+3 -1
webroot/index.php
··· 74 74 75 75 $application->setRequest($request); 76 76 list($controller, $uri_data) = $application->buildController(); 77 + $request->setURIMap($uri_data); 78 + $controller->setRequest($request); 77 79 78 80 $access_log->setData( 79 81 array( ··· 98 100 99 101 if (!$response) { 100 102 $controller->willProcessRequest($uri_data); 101 - $response = $controller->processRequest(); 103 + $response = $controller->handleRequest($request); 102 104 } 103 105 } catch (Exception $ex) { 104 106 $original_exception = $ex;