Page MenuHomePhabricator

D13775.diff
No OneTemporary

D13775.diff

diff --git a/src/applications/settings/controller/PhabricatorSettingsAdjustController.php b/src/applications/settings/controller/PhabricatorSettingsAdjustController.php
--- a/src/applications/settings/controller/PhabricatorSettingsAdjustController.php
+++ b/src/applications/settings/controller/PhabricatorSettingsAdjustController.php
@@ -3,8 +3,7 @@
final class PhabricatorSettingsAdjustController
extends PhabricatorController {
- public function processRequest() {
- $request = $this->getRequest();
+ public function handleRequest(AphrontRequest $request) {
$user = $request->getUser();
$prefs = $user->loadPreferences();
diff --git a/src/applications/settings/controller/PhabricatorSettingsMainController.php b/src/applications/settings/controller/PhabricatorSettingsMainController.php
--- a/src/applications/settings/controller/PhabricatorSettingsMainController.php
+++ b/src/applications/settings/controller/PhabricatorSettingsMainController.php
@@ -3,8 +3,6 @@
final class PhabricatorSettingsMainController
extends PhabricatorController {
- private $id;
- private $key;
private $user;
private function getUser() {
@@ -12,24 +10,20 @@
}
private function isSelf() {
- $viewer_phid = $this->getRequest()->getUser()->getPHID();
+ $viewer_phid = $this->getViewer()->getPHID();
$user_phid = $this->getUser()->getPHID();
return ($viewer_phid == $user_phid);
}
- public function willProcessRequest(array $data) {
- $this->id = idx($data, 'id');
- $this->key = idx($data, 'key');
- }
-
- public function processRequest() {
- $request = $this->getRequest();
- $viewer = $request->getUser();
+ public function handleRequest(AphrontRequest $request) {
+ $viewer = $this->getViewer();
+ $id = $request->getURIData('id');
+ $key = $request->getURIData('key');
- if ($this->id) {
+ if ($id) {
$user = id(new PhabricatorPeopleQuery())
->setViewer($viewer)
- ->withIDs(array($this->id))
+ ->withIDs(array($id))
->requireCapabilities(
array(
PhabricatorPolicyCapability::CAN_VIEW,
@@ -49,7 +43,7 @@
$panels = $this->buildPanels();
$nav = $this->renderSideNav($panels);
- $key = $nav->selectFilter($this->key, head($panels)->getPanelKey());
+ $key = $nav->selectFilter($key, head($panels)->getPanelKey());
$panel = $panels[$key];
$panel->setUser($this->getUser());

File Metadata

Mime Type
text/plain
Expires
Mon, Jan 20, 5:35 PM (22 h, 53 s)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
7023388
Default Alt Text
D13775.diff (2 KB)

Event Timeline