Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F15392745
D13678.id33062.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
D13678.id33062.diff
View Options
diff --git a/src/applications/tokens/controller/PhabricatorTokenGiveController.php b/src/applications/tokens/controller/PhabricatorTokenGiveController.php
--- a/src/applications/tokens/controller/PhabricatorTokenGiveController.php
+++ b/src/applications/tokens/controller/PhabricatorTokenGiveController.php
@@ -2,19 +2,13 @@
final class PhabricatorTokenGiveController extends PhabricatorTokenController {
- private $phid;
-
- public function willProcessRequest(array $data) {
- $this->phid = $data['phid'];
- }
-
- public function processRequest() {
- $request = $this->getRequest();
- $user = $request->getUser();
+ public function handleRequest(AphrontRequest $request) {
+ $user = $request->getViewer();
+ $phid = $request->getURIData('phid');
$handle = id(new PhabricatorHandleQuery())
->setViewer($user)
- ->withPHIDs(array($this->phid))
+ ->withPHIDs(array($phid))
->executeOne();
if (!$handle->isComplete()) {
return new Aphront404Response();
diff --git a/src/applications/tokens/controller/PhabricatorTokenGivenController.php b/src/applications/tokens/controller/PhabricatorTokenGivenController.php
--- a/src/applications/tokens/controller/PhabricatorTokenGivenController.php
+++ b/src/applications/tokens/controller/PhabricatorTokenGivenController.php
@@ -6,9 +6,8 @@
return true;
}
- public function processRequest() {
- $request = $this->getRequest();
- $user = $request->getUser();
+ public function handleRequest(AphrontRequest $request) {
+ $user = $request->getViewer();
$pager = id(new AphrontCursorPagerView())
->readFromRequest($request);
diff --git a/src/applications/tokens/controller/PhabricatorTokenLeaderController.php b/src/applications/tokens/controller/PhabricatorTokenLeaderController.php
--- a/src/applications/tokens/controller/PhabricatorTokenLeaderController.php
+++ b/src/applications/tokens/controller/PhabricatorTokenLeaderController.php
@@ -7,9 +7,8 @@
return true;
}
- public function processRequest() {
- $request = $this->getRequest();
- $user = $request->getUser();
+ public function handleRequest(AphrontRequest $request) {
+ $user = $request->getViewer();
$pager = new PHUIPagerView();
$pager->setURI($request->getRequestURI(), 'page');
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sun, Mar 16, 5:27 PM (2 w, 1 d ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
7684341
Default Alt Text
D13678.id33062.diff (2 KB)
Attached To
Mode
D13678: Update Tokens for handleRequest
Attached
Detach File
Event Timeline
Log In to Comment