Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F19071473
D10698.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
43 KB
Referenced Files
None
Subscribers
None
D10698.diff
View Options
diff --git a/src/aphront/AphrontController.php b/src/aphront/AphrontController.php
--- a/src/aphront/AphrontController.php
+++ b/src/aphront/AphrontController.php
@@ -28,25 +28,45 @@
return $response;
}
- abstract public function processRequest();
+ public function handleRequest(AphrontRequest $request) {
+ if (method_exists($this, 'processRequest')) {
+ return $this->processRequest();
+ }
- final public function __construct(AphrontRequest $request) {
+ throw new PhutilMethodNotImplementedException(
+ pht(
+ 'Controllers must implement either handleRequest() (recommended) '.
+ 'or processRequest() (deprecated).'));
+ }
+
+ final public function setRequest(AphrontRequest $request) {
$this->request = $request;
+ return $this;
}
final public function getRequest() {
+ if (!$this->request) {
+ throw new Exception(pht('Call setRequest() before getRequest()!'));
+ }
return $this->request;
}
+ final public function getViewer() {
+ return $this->getRequest()->getViewer();
+ }
+
final public function delegateToController(AphrontController $controller) {
+ $request = $this->getRequest();
+
$controller->setDelegatingController($this);
+ $controller->setRequest($request);
$application = $this->getCurrentApplication();
if ($application) {
$controller->setCurrentApplication($application);
}
- return $controller->processRequest();
+ return $controller->handleRequest($request);
}
final public function setCurrentApplication(
diff --git a/src/aphront/AphrontRequest.php b/src/aphront/AphrontRequest.php
--- a/src/aphront/AphrontRequest.php
+++ b/src/aphront/AphrontRequest.php
@@ -25,12 +25,26 @@
private $requestData;
private $user;
private $applicationConfiguration;
+ private $uriData;
final public function __construct($host, $path) {
$this->host = $host;
$this->path = $path;
}
+ final public function setURIMap(array $uri_data) {
+ $this->uriData = $uri_data;
+ return $this;
+ }
+
+ final public function getURIMap() {
+ return $this->uriData;
+ }
+
+ final public function getURIData($key, $default = null) {
+ return idx($this->uriData, $key, $default);
+ }
+
final public function setApplicationConfiguration(
$application_configuration) {
$this->applicationConfiguration = $application_configuration;
@@ -476,6 +490,10 @@
return $this->user;
}
+ final public function getViewer() {
+ return $this->user;
+ }
+
final public function getRequestURI() {
$get = $_GET;
unset($get['__path__']);
diff --git a/src/aphront/configuration/AphrontApplicationConfiguration.php b/src/aphront/configuration/AphrontApplicationConfiguration.php
--- a/src/aphront/configuration/AphrontApplicationConfiguration.php
+++ b/src/aphront/configuration/AphrontApplicationConfiguration.php
@@ -239,7 +239,7 @@
$request = $this->getRequest();
- $controller = newv($controller_class, array($request));
+ $controller = newv($controller_class, array());
if ($current_application) {
$controller->setCurrentApplication($current_application);
}
diff --git a/src/aphront/configuration/AphrontDefaultApplicationConfiguration.php b/src/aphront/configuration/AphrontDefaultApplicationConfiguration.php
--- a/src/aphront/configuration/AphrontDefaultApplicationConfiguration.php
+++ b/src/aphront/configuration/AphrontDefaultApplicationConfiguration.php
@@ -152,13 +152,14 @@
//
// Possibly we should add a header here like "you need to login to see
// the thing you are trying to look at".
- $login_controller = new PhabricatorAuthStartController($request);
+ $login_controller = new PhabricatorAuthStartController();
+ $login_controller->setRequest($request);
$auth_app_class = 'PhabricatorAuthApplication';
$auth_app = PhabricatorApplication::getByClass($auth_app_class);
$login_controller->setCurrentApplication($auth_app);
- return $login_controller->processRequest();
+ return $login_controller->handleRequest($request);
}
$list = $ex->getMoreInfo();
@@ -272,12 +273,12 @@
}
public function build404Controller() {
- return array(new Phabricator404Controller($this->getRequest()), array());
+ return array(new Phabricator404Controller(), array());
}
public function buildRedirectController($uri, $external) {
return array(
- new PhabricatorRedirectController($this->getRequest()),
+ new PhabricatorRedirectController(),
array(
'uri' => $uri,
'external' => $external,
diff --git a/src/applications/audit/controller/PhabricatorAuditListController.php b/src/applications/audit/controller/PhabricatorAuditListController.php
--- a/src/applications/audit/controller/PhabricatorAuditListController.php
+++ b/src/applications/audit/controller/PhabricatorAuditListController.php
@@ -3,22 +3,13 @@
final class PhabricatorAuditListController
extends PhabricatorAuditController {
- private $queryKey;
- private $name;
- private $filterStatus;
-
public function shouldAllowPublic() {
return true;
}
- public function willProcessRequest(array $data) {
- $this->queryKey = idx($data, 'queryKey');
- }
-
- public function processRequest() {
- $request = $this->getRequest();
- $controller = id(new PhabricatorApplicationSearchController($request))
- ->setQueryKey($this->queryKey)
+ public function handleRequest(AphrontRequest $request) {
+ $controller = id(new PhabricatorApplicationSearchController())
+ ->setQueryKey($request->getURIData('queryKey'))
->setSearchEngine(new PhabricatorCommitSearchEngine())
->setNavigation($this->buildSideNavView());
diff --git a/src/applications/base/controller/PhabricatorController.php b/src/applications/base/controller/PhabricatorController.php
--- a/src/applications/base/controller/PhabricatorController.php
+++ b/src/applications/base/controller/PhabricatorController.php
@@ -137,11 +137,11 @@
if ($this->shouldRequireEnabledUser()) {
if ($user->isLoggedIn() && !$user->getIsApproved()) {
- $controller = new PhabricatorAuthNeedsApprovalController($request);
+ $controller = new PhabricatorAuthNeedsApprovalController();
return $this->delegateToController($controller);
}
if ($user->getIsDisabled()) {
- $controller = new PhabricatorDisabledUserController($request);
+ $controller = new PhabricatorDisabledUserController();
return $this->delegateToController($controller);
}
}
@@ -166,7 +166,7 @@
if (!$this->shouldAllowPartialSessions()) {
if ($user->hasSession() &&
$user->getSession()->getIsPartial()) {
- $login_controller = new PhabricatorAuthFinishController($request);
+ $login_controller = new PhabricatorAuthFinishController();
$this->setCurrentApplication($auth_application);
return $this->delegateToController($login_controller);
}
@@ -180,8 +180,7 @@
// and require MFA enrollment.
$user->updateMultiFactorEnrollment();
if (!$user->getIsEnrolledInMultiFactor()) {
- $mfa_controller = new PhabricatorAuthNeedsMultiFactorController(
- $request);
+ $mfa_controller = new PhabricatorAuthNeedsMultiFactorController();
$this->setCurrentApplication($auth_application);
return $this->delegateToController($mfa_controller);
}
@@ -198,7 +197,7 @@
// If this controller isn't public, and the user isn't logged in, require
// login.
if (!$allow_public && !$user->isLoggedIn()) {
- $login_controller = new PhabricatorAuthStartController($request);
+ $login_controller = new PhabricatorAuthStartController();
$this->setCurrentApplication($auth_application);
return $this->delegateToController($login_controller);
}
@@ -206,7 +205,7 @@
if ($user->isLoggedIn()) {
if ($this->shouldRequireEmailVerification()) {
if (!$user->getIsEmailVerified()) {
- $controller = new PhabricatorMustVerifyEmailController($request);
+ $controller = new PhabricatorMustVerifyEmailController();
$this->setCurrentApplication($auth_application);
return $this->delegateToController($controller);
}
diff --git a/src/applications/base/controller/__tests__/PhabricatorAccessControlTestCase.php b/src/applications/base/controller/__tests__/PhabricatorAccessControlTestCase.php
--- a/src/applications/base/controller/__tests__/PhabricatorAccessControlTestCase.php
+++ b/src/applications/base/controller/__tests__/PhabricatorAccessControlTestCase.php
@@ -22,7 +22,8 @@
->setApplicationConfiguration($application_configuration)
->setRequestData(array());
- $controller = new PhabricatorTestController($request);
+ $controller = new PhabricatorTestController();
+ $controller->setRequest($request);
$u_public = id(new PhabricatorUser())
->setUsername('public');
diff --git a/src/applications/calendar/controller/PhabricatorCalendarEventListController.php b/src/applications/calendar/controller/PhabricatorCalendarEventListController.php
--- a/src/applications/calendar/controller/PhabricatorCalendarEventListController.php
+++ b/src/applications/calendar/controller/PhabricatorCalendarEventListController.php
@@ -14,8 +14,7 @@
}
public function processRequest() {
- $request = $this->getRequest();
- $controller = id(new PhabricatorApplicationSearchController($request))
+ $controller = id(new PhabricatorApplicationSearchController())
->setQueryKey($this->queryKey)
->setSearchEngine(new PhabricatorCalendarEventSearchEngine())
->setNavigation($this->buildSideNav());
diff --git a/src/applications/conduit/controller/PhabricatorConduitListController.php b/src/applications/conduit/controller/PhabricatorConduitListController.php
--- a/src/applications/conduit/controller/PhabricatorConduitListController.php
+++ b/src/applications/conduit/controller/PhabricatorConduitListController.php
@@ -14,8 +14,7 @@
}
public function processRequest() {
- $request = $this->getRequest();
- $controller = id(new PhabricatorApplicationSearchController($request))
+ $controller = id(new PhabricatorApplicationSearchController())
->setQueryKey($this->queryKey)
->setSearchEngine(new PhabricatorConduitSearchEngine())
->setNavigation($this->buildSideNavView());
diff --git a/src/applications/countdown/controller/PhabricatorCountdownListController.php b/src/applications/countdown/controller/PhabricatorCountdownListController.php
--- a/src/applications/countdown/controller/PhabricatorCountdownListController.php
+++ b/src/applications/countdown/controller/PhabricatorCountdownListController.php
@@ -14,8 +14,7 @@
}
public function processRequest() {
- $request = $this->getRequest();
- $controller = id(new PhabricatorApplicationSearchController($request))
+ $controller = id(new PhabricatorApplicationSearchController())
->setQueryKey($this->queryKey)
->setSearchEngine(new PhabricatorCountdownSearchEngine())
->setNavigation($this->buildSideNavView());
diff --git a/src/applications/dashboard/controller/PhabricatorDashboardListController.php b/src/applications/dashboard/controller/PhabricatorDashboardListController.php
--- a/src/applications/dashboard/controller/PhabricatorDashboardListController.php
+++ b/src/applications/dashboard/controller/PhabricatorDashboardListController.php
@@ -14,8 +14,7 @@
}
public function processRequest() {
- $request = $this->getRequest();
- $controller = id(new PhabricatorApplicationSearchController($request))
+ $controller = id(new PhabricatorApplicationSearchController())
->setQueryKey($this->queryKey)
->setSearchEngine(new PhabricatorDashboardSearchEngine())
->setNavigation($this->buildSideNavView());
diff --git a/src/applications/dashboard/controller/PhabricatorDashboardPanelListController.php b/src/applications/dashboard/controller/PhabricatorDashboardPanelListController.php
--- a/src/applications/dashboard/controller/PhabricatorDashboardPanelListController.php
+++ b/src/applications/dashboard/controller/PhabricatorDashboardPanelListController.php
@@ -14,8 +14,7 @@
}
public function processRequest() {
- $request = $this->getRequest();
- $controller = id(new PhabricatorApplicationSearchController($request))
+ $controller = id(new PhabricatorApplicationSearchController())
->setQueryKey($this->queryKey)
->setSearchEngine(new PhabricatorDashboardPanelSearchEngine())
->setNavigation($this->buildSideNavView());
diff --git a/src/applications/differential/controller/DifferentialRevisionListController.php b/src/applications/differential/controller/DifferentialRevisionListController.php
--- a/src/applications/differential/controller/DifferentialRevisionListController.php
+++ b/src/applications/differential/controller/DifferentialRevisionListController.php
@@ -13,8 +13,7 @@
}
public function processRequest() {
- $request = $this->getRequest();
- $controller = id(new PhabricatorApplicationSearchController($request))
+ $controller = id(new PhabricatorApplicationSearchController())
->setQueryKey($this->queryKey)
->setSearchEngine(new DifferentialRevisionSearchEngine())
->setNavigation($this->buildSideNavView());
diff --git a/src/applications/diffusion/controller/DiffusionBrowseMainController.php b/src/applications/diffusion/controller/DiffusionBrowseMainController.php
--- a/src/applications/diffusion/controller/DiffusionBrowseMainController.php
+++ b/src/applications/diffusion/controller/DiffusionBrowseMainController.php
@@ -12,7 +12,7 @@
$grep = $request->getStr('grep');
$find = $request->getStr('find');
if (strlen($grep) || strlen($find)) {
- $controller = new DiffusionBrowseSearchController($request);
+ $controller = new DiffusionBrowseSearchController();
} else {
$results = DiffusionBrowseResultSet::newFromConduit(
$this->callConduitWithDiffusionRequest(
diff --git a/src/applications/diffusion/controller/DiffusionController.php b/src/applications/diffusion/controller/DiffusionController.php
--- a/src/applications/diffusion/controller/DiffusionController.php
+++ b/src/applications/diffusion/controller/DiffusionController.php
@@ -23,7 +23,7 @@
// "svn checkout". If it is, we jump off into repository serving code to
// process the request.
if (DiffusionServeController::isVCSRequest($request)) {
- $serve_controller = id(new DiffusionServeController($request))
+ $serve_controller = id(new DiffusionServeController())
->setCurrentApplication($this->getCurrentApplication());
return $this->delegateToController($serve_controller);
}
diff --git a/src/applications/diffusion/controller/DiffusionLintController.php b/src/applications/diffusion/controller/DiffusionLintController.php
--- a/src/applications/diffusion/controller/DiffusionLintController.php
+++ b/src/applications/diffusion/controller/DiffusionLintController.php
@@ -12,7 +12,7 @@
$drequest = $this->diffusionRequest;
if ($request->getStr('lint') !== null) {
- $controller = new DiffusionLintDetailsController($request);
+ $controller = new DiffusionLintDetailsController();
$controller->setDiffusionRequest($drequest);
$controller->setCurrentApplication($this->getCurrentApplication());
return $this->delegateToController($controller);
diff --git a/src/applications/diffusion/controller/DiffusionPushLogListController.php b/src/applications/diffusion/controller/DiffusionPushLogListController.php
--- a/src/applications/diffusion/controller/DiffusionPushLogListController.php
+++ b/src/applications/diffusion/controller/DiffusionPushLogListController.php
@@ -14,7 +14,7 @@
public function processRequest() {
$request = $this->getRequest();
- $controller = id(new PhabricatorApplicationSearchController($request))
+ $controller = id(new PhabricatorApplicationSearchController())
->setQueryKey($this->queryKey)
->setSearchEngine(new PhabricatorRepositoryPushLogSearchEngine())
->setNavigation($this->buildSideNavView());
diff --git a/src/applications/diffusion/controller/DiffusionRepositoryListController.php b/src/applications/diffusion/controller/DiffusionRepositoryListController.php
--- a/src/applications/diffusion/controller/DiffusionRepositoryListController.php
+++ b/src/applications/diffusion/controller/DiffusionRepositoryListController.php
@@ -14,7 +14,7 @@
public function processRequest() {
$request = $this->getRequest();
- $controller = id(new PhabricatorApplicationSearchController($request))
+ $controller = id(new PhabricatorApplicationSearchController())
->setQueryKey($this->queryKey)
->setSearchEngine(new PhabricatorRepositorySearchEngine())
->setNavigation($this->buildSideNavView());
diff --git a/src/applications/diviner/controller/DivinerAtomListController.php b/src/applications/diviner/controller/DivinerAtomListController.php
--- a/src/applications/diviner/controller/DivinerAtomListController.php
+++ b/src/applications/diviner/controller/DivinerAtomListController.php
@@ -14,7 +14,7 @@
public function processRequest() {
$request = $this->getRequest();
- $controller = id(new PhabricatorApplicationSearchController($request))
+ $controller = id(new PhabricatorApplicationSearchController())
->setQueryKey($this->key)
->setSearchEngine(new DivinerAtomSearchEngine())
->setNavigation($this->buildSideNavView());
diff --git a/src/applications/drydock/controller/DrydockBlueprintListController.php b/src/applications/drydock/controller/DrydockBlueprintListController.php
--- a/src/applications/drydock/controller/DrydockBlueprintListController.php
+++ b/src/applications/drydock/controller/DrydockBlueprintListController.php
@@ -14,7 +14,7 @@
public function processRequest() {
$request = $this->getRequest();
- $controller = id(new PhabricatorApplicationSearchController($request))
+ $controller = id(new PhabricatorApplicationSearchController())
->setQueryKey($this->queryKey)
->setSearchEngine(new DrydockBlueprintSearchEngine())
->setNavigation($this->buildSideNavView());
diff --git a/src/applications/drydock/controller/DrydockLeaseListController.php b/src/applications/drydock/controller/DrydockLeaseListController.php
--- a/src/applications/drydock/controller/DrydockLeaseListController.php
+++ b/src/applications/drydock/controller/DrydockLeaseListController.php
@@ -13,8 +13,7 @@
}
public function processRequest() {
- $request = $this->getRequest();
- $controller = id(new PhabricatorApplicationSearchController($request))
+ $controller = id(new PhabricatorApplicationSearchController())
->setQueryKey($this->queryKey)
->setSearchEngine(new DrydockLeaseSearchEngine())
->setNavigation($this->buildSideNavView());
diff --git a/src/applications/drydock/controller/DrydockLogListController.php b/src/applications/drydock/controller/DrydockLogListController.php
--- a/src/applications/drydock/controller/DrydockLogListController.php
+++ b/src/applications/drydock/controller/DrydockLogListController.php
@@ -13,8 +13,7 @@
}
public function processRequest() {
- $request = $this->getRequest();
- $controller = id(new PhabricatorApplicationSearchController($request))
+ $controller = id(new PhabricatorApplicationSearchController())
->setQueryKey($this->queryKey)
->setSearchEngine(new DrydockLogSearchEngine())
->setNavigation($this->buildSideNavView());
diff --git a/src/applications/drydock/controller/DrydockResourceListController.php b/src/applications/drydock/controller/DrydockResourceListController.php
--- a/src/applications/drydock/controller/DrydockResourceListController.php
+++ b/src/applications/drydock/controller/DrydockResourceListController.php
@@ -13,8 +13,7 @@
}
public function processRequest() {
- $request = $this->getRequest();
- $controller = id(new PhabricatorApplicationSearchController($request))
+ $controller = id(new PhabricatorApplicationSearchController())
->setQueryKey($this->queryKey)
->setSearchEngine(new DrydockResourceSearchEngine())
->setNavigation($this->buildSideNavView());
diff --git a/src/applications/feed/controller/PhabricatorFeedListController.php b/src/applications/feed/controller/PhabricatorFeedListController.php
--- a/src/applications/feed/controller/PhabricatorFeedListController.php
+++ b/src/applications/feed/controller/PhabricatorFeedListController.php
@@ -13,8 +13,7 @@
}
public function processRequest() {
- $request = $this->getRequest();
- $controller = id(new PhabricatorApplicationSearchController($request))
+ $controller = id(new PhabricatorApplicationSearchController())
->setQueryKey($this->queryKey)
->setSearchEngine(new PhabricatorFeedSearchEngine())
->setNavigation($this->buildSideNavView());
diff --git a/src/applications/files/controller/PhabricatorFileListController.php b/src/applications/files/controller/PhabricatorFileListController.php
--- a/src/applications/files/controller/PhabricatorFileListController.php
+++ b/src/applications/files/controller/PhabricatorFileListController.php
@@ -13,8 +13,7 @@
}
public function processRequest() {
- $request = $this->getRequest();
- $controller = id(new PhabricatorApplicationSearchController($request))
+ $controller = id(new PhabricatorApplicationSearchController())
->setQueryKey($this->key)
->setSearchEngine(new PhabricatorFileSearchEngine())
->setNavigation($this->buildSideNavView());
diff --git a/src/applications/flag/controller/PhabricatorFlagListController.php b/src/applications/flag/controller/PhabricatorFlagListController.php
--- a/src/applications/flag/controller/PhabricatorFlagListController.php
+++ b/src/applications/flag/controller/PhabricatorFlagListController.php
@@ -13,8 +13,7 @@
}
public function processRequest() {
- $request = $this->getRequest();
- $controller = id(new PhabricatorApplicationSearchController($request))
+ $controller = id(new PhabricatorApplicationSearchController())
->setQueryKey($this->queryKey)
->setSearchEngine(new PhabricatorFlagSearchEngine())
->setNavigation($this->buildSideNavView());
diff --git a/src/applications/fund/controller/FundBackerListController.php b/src/applications/fund/controller/FundBackerListController.php
--- a/src/applications/fund/controller/FundBackerListController.php
+++ b/src/applications/fund/controller/FundBackerListController.php
@@ -29,7 +29,7 @@
}
}
- $controller = id(new PhabricatorApplicationSearchController($request))
+ $controller = id(new PhabricatorApplicationSearchController())
->setQueryKey($this->queryKey)
->setSearchEngine($this->getEngine())
->setNavigation($this->buildSideNavView());
diff --git a/src/applications/fund/controller/FundInitiativeListController.php b/src/applications/fund/controller/FundInitiativeListController.php
--- a/src/applications/fund/controller/FundInitiativeListController.php
+++ b/src/applications/fund/controller/FundInitiativeListController.php
@@ -14,8 +14,7 @@
}
public function processRequest() {
- $request = $this->getRequest();
- $controller = id(new PhabricatorApplicationSearchController($request))
+ $controller = id(new PhabricatorApplicationSearchController())
->setQueryKey($this->queryKey)
->setSearchEngine(new FundInitiativeSearchEngine())
->setNavigation($this->buildSideNavView());
diff --git a/src/applications/harbormaster/controller/HarbormasterBuildableListController.php b/src/applications/harbormaster/controller/HarbormasterBuildableListController.php
--- a/src/applications/harbormaster/controller/HarbormasterBuildableListController.php
+++ b/src/applications/harbormaster/controller/HarbormasterBuildableListController.php
@@ -13,8 +13,7 @@
}
public function processRequest() {
- $request = $this->getRequest();
- $controller = id(new PhabricatorApplicationSearchController($request))
+ $controller = id(new PhabricatorApplicationSearchController())
->setQueryKey($this->queryKey)
->setSearchEngine(new HarbormasterBuildableSearchEngine())
->setNavigation($this->buildSideNavView());
diff --git a/src/applications/harbormaster/controller/HarbormasterPlanListController.php b/src/applications/harbormaster/controller/HarbormasterPlanListController.php
--- a/src/applications/harbormaster/controller/HarbormasterPlanListController.php
+++ b/src/applications/harbormaster/controller/HarbormasterPlanListController.php
@@ -13,8 +13,7 @@
}
public function processRequest() {
- $request = $this->getRequest();
- $controller = id(new PhabricatorApplicationSearchController($request))
+ $controller = id(new PhabricatorApplicationSearchController())
->setQueryKey($this->queryKey)
->setSearchEngine(new HarbormasterBuildPlanSearchEngine())
->setNavigation($this->buildSideNavView());
diff --git a/src/applications/herald/controller/HeraldRuleListController.php b/src/applications/herald/controller/HeraldRuleListController.php
--- a/src/applications/herald/controller/HeraldRuleListController.php
+++ b/src/applications/herald/controller/HeraldRuleListController.php
@@ -13,8 +13,7 @@
}
public function processRequest() {
- $request = $this->getRequest();
- $controller = id(new PhabricatorApplicationSearchController($request))
+ $controller = id(new PhabricatorApplicationSearchController())
->setQueryKey($this->queryKey)
->setSearchEngine(new HeraldRuleSearchEngine())
->setNavigation($this->buildSideNavView());
diff --git a/src/applications/herald/controller/HeraldTranscriptListController.php b/src/applications/herald/controller/HeraldTranscriptListController.php
--- a/src/applications/herald/controller/HeraldTranscriptListController.php
+++ b/src/applications/herald/controller/HeraldTranscriptListController.php
@@ -37,8 +37,7 @@
}
public function processRequest() {
- $request = $this->getRequest();
- $controller = id(new PhabricatorApplicationSearchController($request))
+ $controller = id(new PhabricatorApplicationSearchController())
->setQueryKey($this->queryKey)
->setSearchEngine(new HeraldTranscriptSearchEngine())
->setNavigation($this->buildSideNavView());
diff --git a/src/applications/legalpad/controller/LegalpadDocumentListController.php b/src/applications/legalpad/controller/LegalpadDocumentListController.php
--- a/src/applications/legalpad/controller/LegalpadDocumentListController.php
+++ b/src/applications/legalpad/controller/LegalpadDocumentListController.php
@@ -13,8 +13,7 @@
}
public function processRequest() {
- $request = $this->getRequest();
- $controller = id(new PhabricatorApplicationSearchController($request))
+ $controller = id(new PhabricatorApplicationSearchController())
->setQueryKey($this->queryKey)
->setSearchEngine(new LegalpadDocumentSearchEngine())
->setNavigation($this->buildSideNav());
diff --git a/src/applications/legalpad/controller/LegalpadDocumentSignatureListController.php b/src/applications/legalpad/controller/LegalpadDocumentSignatureListController.php
--- a/src/applications/legalpad/controller/LegalpadDocumentSignatureListController.php
+++ b/src/applications/legalpad/controller/LegalpadDocumentSignatureListController.php
@@ -38,7 +38,7 @@
$engine->setDocument($this->document);
}
- $controller = id(new PhabricatorApplicationSearchController($request))
+ $controller = id(new PhabricatorApplicationSearchController())
->setQueryKey($this->queryKey)
->setSearchEngine($engine)
->setNavigation($this->buildSideNav());
diff --git a/src/applications/macro/controller/PhabricatorMacroListController.php b/src/applications/macro/controller/PhabricatorMacroListController.php
--- a/src/applications/macro/controller/PhabricatorMacroListController.php
+++ b/src/applications/macro/controller/PhabricatorMacroListController.php
@@ -13,8 +13,7 @@
}
public function processRequest() {
- $request = $this->getRequest();
- $controller = id(new PhabricatorApplicationSearchController($request))
+ $controller = id(new PhabricatorApplicationSearchController())
->setQueryKey($this->key)
->setSearchEngine(new PhabricatorMacroSearchEngine())
->setNavigation($this->buildSideNavView());
diff --git a/src/applications/mailinglists/controller/PhabricatorMailingListsListController.php b/src/applications/mailinglists/controller/PhabricatorMailingListsListController.php
--- a/src/applications/mailinglists/controller/PhabricatorMailingListsListController.php
+++ b/src/applications/mailinglists/controller/PhabricatorMailingListsListController.php
@@ -14,8 +14,7 @@
}
public function processRequest() {
- $request = $this->getRequest();
- $controller = id(new PhabricatorApplicationSearchController($request))
+ $controller = id(new PhabricatorApplicationSearchController())
->setQueryKey($this->queryKey)
->setSearchEngine(new PhabricatorMailingListSearchEngine())
->setNavigation($this->buildSideNavView());
diff --git a/src/applications/maniphest/controller/ManiphestTaskListController.php b/src/applications/maniphest/controller/ManiphestTaskListController.php
--- a/src/applications/maniphest/controller/ManiphestTaskListController.php
+++ b/src/applications/maniphest/controller/ManiphestTaskListController.php
@@ -14,8 +14,7 @@
}
public function processRequest() {
- $request = $this->getRequest();
- $controller = id(new PhabricatorApplicationSearchController($request))
+ $controller = id(new PhabricatorApplicationSearchController())
->setQueryKey($this->queryKey)
->setSearchEngine(
id(new ManiphestTaskSearchEngine())
diff --git a/src/applications/meta/controller/PhabricatorApplicationsListController.php b/src/applications/meta/controller/PhabricatorApplicationsListController.php
--- a/src/applications/meta/controller/PhabricatorApplicationsListController.php
+++ b/src/applications/meta/controller/PhabricatorApplicationsListController.php
@@ -14,8 +14,7 @@
}
public function processRequest() {
- $request = $this->getRequest();
- $controller = id(new PhabricatorApplicationSearchController($request))
+ $controller = id(new PhabricatorApplicationSearchController())
->setQueryKey($this->queryKey)
->setSearchEngine(new PhabricatorAppSearchEngine())
->setNavigation($this->buildSideNavView());
diff --git a/src/applications/notification/controller/PhabricatorNotificationListController.php b/src/applications/notification/controller/PhabricatorNotificationListController.php
--- a/src/applications/notification/controller/PhabricatorNotificationListController.php
+++ b/src/applications/notification/controller/PhabricatorNotificationListController.php
@@ -10,8 +10,7 @@
}
public function processRequest() {
- $request = $this->getRequest();
- $controller = id(new PhabricatorApplicationSearchController($request))
+ $controller = id(new PhabricatorApplicationSearchController())
->setQueryKey($this->queryKey)
->setSearchEngine(new PhabricatorNotificationSearchEngine())
->setNavigation($this->buildSideNavView());
diff --git a/src/applications/oauthserver/controller/client/PhabricatorOAuthClientListController.php b/src/applications/oauthserver/controller/client/PhabricatorOAuthClientListController.php
--- a/src/applications/oauthserver/controller/client/PhabricatorOAuthClientListController.php
+++ b/src/applications/oauthserver/controller/client/PhabricatorOAuthClientListController.php
@@ -14,8 +14,7 @@
}
public function processRequest() {
- $request = $this->getRequest();
- $controller = id(new PhabricatorApplicationSearchController($request))
+ $controller = id(new PhabricatorApplicationSearchController())
->setQueryKey($this->queryKey)
->setSearchEngine(new PhabricatorOAuthServerClientSearchEngine())
->setNavigation($this->buildSideNavView());
diff --git a/src/applications/passphrase/controller/PassphraseCredentialListController.php b/src/applications/passphrase/controller/PassphraseCredentialListController.php
--- a/src/applications/passphrase/controller/PassphraseCredentialListController.php
+++ b/src/applications/passphrase/controller/PassphraseCredentialListController.php
@@ -13,8 +13,7 @@
}
public function processRequest() {
- $request = $this->getRequest();
- $controller = id(new PhabricatorApplicationSearchController($request))
+ $controller = id(new PhabricatorApplicationSearchController())
->setQueryKey($this->queryKey)
->setSearchEngine(new PassphraseCredentialSearchEngine())
->setNavigation($this->buildSideNavView());
diff --git a/src/applications/paste/controller/PhabricatorPasteListController.php b/src/applications/paste/controller/PhabricatorPasteListController.php
--- a/src/applications/paste/controller/PhabricatorPasteListController.php
+++ b/src/applications/paste/controller/PhabricatorPasteListController.php
@@ -13,8 +13,7 @@
}
public function processRequest() {
- $request = $this->getRequest();
- $controller = id(new PhabricatorApplicationSearchController($request))
+ $controller = id(new PhabricatorApplicationSearchController())
->setQueryKey($this->queryKey)
->setSearchEngine(new PhabricatorPasteSearchEngine())
->setNavigation($this->buildSideNavView());
diff --git a/src/applications/people/controller/PhabricatorPeopleListController.php b/src/applications/people/controller/PhabricatorPeopleListController.php
--- a/src/applications/people/controller/PhabricatorPeopleListController.php
+++ b/src/applications/people/controller/PhabricatorPeopleListController.php
@@ -18,13 +18,10 @@
}
public function processRequest() {
- $request = $this->getRequest();
- $viewer = $request->getUser();
-
$this->requireApplicationCapability(
PeopleBrowseUserDirectoryCapability::CAPABILITY);
- $controller = id(new PhabricatorApplicationSearchController($request))
+ $controller = id(new PhabricatorApplicationSearchController())
->setQueryKey($this->key)
->setSearchEngine(new PhabricatorPeopleSearchEngine())
->setNavigation($this->buildSideNavView());
diff --git a/src/applications/people/controller/PhabricatorPeopleLogsController.php b/src/applications/people/controller/PhabricatorPeopleLogsController.php
--- a/src/applications/people/controller/PhabricatorPeopleLogsController.php
+++ b/src/applications/people/controller/PhabricatorPeopleLogsController.php
@@ -10,8 +10,7 @@
}
public function processRequest() {
- $request = $this->getRequest();
- $controller = id(new PhabricatorApplicationSearchController($request))
+ $controller = id(new PhabricatorApplicationSearchController())
->setQueryKey($this->queryKey)
->setSearchEngine(new PhabricatorPeopleLogSearchEngine())
->setNavigation($this->buildSideNavView());
diff --git a/src/applications/pholio/controller/PholioMockListController.php b/src/applications/pholio/controller/PholioMockListController.php
--- a/src/applications/pholio/controller/PholioMockListController.php
+++ b/src/applications/pholio/controller/PholioMockListController.php
@@ -13,8 +13,7 @@
}
public function processRequest() {
- $request = $this->getRequest();
- $controller = id(new PhabricatorApplicationSearchController($request))
+ $controller = id(new PhabricatorApplicationSearchController())
->setQueryKey($this->queryKey)
->setSearchEngine(new PholioMockSearchEngine())
->setNavigation($this->buildSideNavView());
diff --git a/src/applications/phortune/controller/PhortuneCartListController.php b/src/applications/phortune/controller/PhortuneCartListController.php
--- a/src/applications/phortune/controller/PhortuneCartListController.php
+++ b/src/applications/phortune/controller/PhortuneCartListController.php
@@ -56,7 +56,7 @@
return new Aphront404Response();
}
- $controller = id(new PhabricatorApplicationSearchController($request))
+ $controller = id(new PhabricatorApplicationSearchController())
->setQueryKey($this->queryKey)
->setSearchEngine($engine)
->setNavigation($this->buildSideNavView());
diff --git a/src/applications/phortune/controller/PhortuneChargeListController.php b/src/applications/phortune/controller/PhortuneChargeListController.php
--- a/src/applications/phortune/controller/PhortuneChargeListController.php
+++ b/src/applications/phortune/controller/PhortuneChargeListController.php
@@ -38,7 +38,7 @@
return new Aphront404Response();
}
- $controller = id(new PhabricatorApplicationSearchController($request))
+ $controller = id(new PhabricatorApplicationSearchController())
->setQueryKey($this->queryKey)
->setSearchEngine($engine)
->setNavigation($this->buildSideNavView());
diff --git a/src/applications/phortune/controller/PhortuneMerchantListController.php b/src/applications/phortune/controller/PhortuneMerchantListController.php
--- a/src/applications/phortune/controller/PhortuneMerchantListController.php
+++ b/src/applications/phortune/controller/PhortuneMerchantListController.php
@@ -14,8 +14,7 @@
}
public function processRequest() {
- $request = $this->getRequest();
- $controller = id(new PhabricatorApplicationSearchController($request))
+ $controller = id(new PhabricatorApplicationSearchController())
->setQueryKey($this->queryKey)
->setSearchEngine(new PhortuneMerchantSearchEngine())
->setNavigation($this->buildSideNavView());
diff --git a/src/applications/phrequent/controller/PhrequentListController.php b/src/applications/phrequent/controller/PhrequentListController.php
--- a/src/applications/phrequent/controller/PhrequentListController.php
+++ b/src/applications/phrequent/controller/PhrequentListController.php
@@ -13,8 +13,7 @@
}
public function processRequest() {
- $request = $this->getRequest();
- $controller = id(new PhabricatorApplicationSearchController($request))
+ $controller = id(new PhabricatorApplicationSearchController())
->setQueryKey($this->queryKey)
->setSearchEngine(new PhrequentSearchEngine())
->setNavigation($this->buildSideNavView());
diff --git a/src/applications/phriction/controller/PhrictionListController.php b/src/applications/phriction/controller/PhrictionListController.php
--- a/src/applications/phriction/controller/PhrictionListController.php
+++ b/src/applications/phriction/controller/PhrictionListController.php
@@ -14,8 +14,7 @@
}
public function processRequest() {
- $request = $this->getRequest();
- $controller = id(new PhabricatorApplicationSearchController($request))
+ $controller = id(new PhabricatorApplicationSearchController())
->setQueryKey($this->queryKey)
->setSearchEngine(new PhrictionSearchEngine())
->setNavigation($this->buildSideNavView());
diff --git a/src/applications/ponder/controller/PonderQuestionListController.php b/src/applications/ponder/controller/PonderQuestionListController.php
--- a/src/applications/ponder/controller/PonderQuestionListController.php
+++ b/src/applications/ponder/controller/PonderQuestionListController.php
@@ -13,8 +13,7 @@
}
public function processRequest() {
- $request = $this->getRequest();
- $controller = id(new PhabricatorApplicationSearchController($request))
+ $controller = id(new PhabricatorApplicationSearchController())
->setQueryKey($this->queryKey)
->setSearchEngine(new PonderQuestionSearchEngine())
->setNavigation($this->buildSideNavView());
diff --git a/src/applications/project/controller/PhabricatorProjectListController.php b/src/applications/project/controller/PhabricatorProjectListController.php
--- a/src/applications/project/controller/PhabricatorProjectListController.php
+++ b/src/applications/project/controller/PhabricatorProjectListController.php
@@ -14,8 +14,7 @@
}
public function processRequest() {
- $request = $this->getRequest();
- $controller = id(new PhabricatorApplicationSearchController($request))
+ $controller = id(new PhabricatorApplicationSearchController())
->setQueryKey($this->queryKey)
->setSearchEngine(new PhabricatorProjectSearchEngine())
->setNavigation($this->buildSideNavView());
diff --git a/src/applications/releeph/controller/branch/ReleephBranchViewController.php b/src/applications/releeph/controller/branch/ReleephBranchViewController.php
--- a/src/applications/releeph/controller/branch/ReleephBranchViewController.php
+++ b/src/applications/releeph/controller/branch/ReleephBranchViewController.php
@@ -28,7 +28,7 @@
}
$this->setBranch($branch);
- $controller = id(new PhabricatorApplicationSearchController($request))
+ $controller = id(new PhabricatorApplicationSearchController())
->setPreface($this->renderPreface())
->setQueryKey($this->queryKey)
->setSearchEngine($this->getSearchEngine())
diff --git a/src/applications/releeph/controller/product/ReleephProductListController.php b/src/applications/releeph/controller/product/ReleephProductListController.php
--- a/src/applications/releeph/controller/product/ReleephProductListController.php
+++ b/src/applications/releeph/controller/product/ReleephProductListController.php
@@ -13,8 +13,7 @@
}
public function processRequest() {
- $request = $this->getRequest();
- $controller = id(new PhabricatorApplicationSearchController($request))
+ $controller = id(new PhabricatorApplicationSearchController())
->setQueryKey($this->queryKey)
->setSearchEngine(new ReleephProductSearchEngine())
->setNavigation($this->buildSideNavView());
diff --git a/src/applications/releeph/controller/product/ReleephProductViewController.php b/src/applications/releeph/controller/product/ReleephProductViewController.php
--- a/src/applications/releeph/controller/product/ReleephProductViewController.php
+++ b/src/applications/releeph/controller/product/ReleephProductViewController.php
@@ -28,7 +28,7 @@
}
$this->setProduct($product);
- $controller = id(new PhabricatorApplicationSearchController($request))
+ $controller = id(new PhabricatorApplicationSearchController())
->setQueryKey($this->queryKey)
->setPreface($this->renderPreface())
->setSearchEngine(
diff --git a/src/applications/search/controller/PhabricatorSearchController.php b/src/applications/search/controller/PhabricatorSearchController.php
--- a/src/applications/search/controller/PhabricatorSearchController.php
+++ b/src/applications/search/controller/PhabricatorSearchController.php
@@ -72,7 +72,7 @@
}
}
- $controller = id(new PhabricatorApplicationSearchController($request))
+ $controller = id(new PhabricatorApplicationSearchController())
->setQueryKey($this->queryKey)
->setSearchEngine($engine)
->setNavigation($this->buildSideNavView());
diff --git a/src/applications/slowvote/controller/PhabricatorSlowvoteListController.php b/src/applications/slowvote/controller/PhabricatorSlowvoteListController.php
--- a/src/applications/slowvote/controller/PhabricatorSlowvoteListController.php
+++ b/src/applications/slowvote/controller/PhabricatorSlowvoteListController.php
@@ -14,8 +14,7 @@
}
public function processRequest() {
- $request = $this->getRequest();
- $controller = id(new PhabricatorApplicationSearchController($request))
+ $controller = id(new PhabricatorApplicationSearchController())
->setQueryKey($this->queryKey)
->setSearchEngine(new PhabricatorSlowvoteSearchEngine())
->setNavigation($this->buildSideNavView());
diff --git a/webroot/index.php b/webroot/index.php
--- a/webroot/index.php
+++ b/webroot/index.php
@@ -74,6 +74,8 @@
$application->setRequest($request);
list($controller, $uri_data) = $application->buildController();
+ $request->setURIMap($uri_data);
+ $controller->setRequest($request);
$access_log->setData(
array(
@@ -98,7 +100,7 @@
if (!$response) {
$controller->willProcessRequest($uri_data);
- $response = $controller->processRequest();
+ $response = $controller->handleRequest($request);
}
} catch (Exception $ex) {
$original_exception = $ex;
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Dec 1 2025, 7:40 PM (5 w, 3 d ago)
Storage Engine
amazon-s3
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
phabricator/secure/qp/cs/mz3l5tjbk2frxr6u
Default Alt Text
D10698.diff (43 KB)
Attached To
Mode
D10698: Decouple some aspects of request routing and construction
Attached
Detach File
Event Timeline
Log In to Comment