Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F14021724
D13767.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
6 KB
Referenced Files
None
Subscribers
None
D13767.diff
View Options
diff --git a/src/applications/notification/controller/PhabricatorNotificationClearController.php b/src/applications/notification/controller/PhabricatorNotificationClearController.php
--- a/src/applications/notification/controller/PhabricatorNotificationClearController.php
+++ b/src/applications/notification/controller/PhabricatorNotificationClearController.php
@@ -3,10 +3,9 @@
final class PhabricatorNotificationClearController
extends PhabricatorNotificationController {
- public function processRequest() {
- $request = $this->getRequest();
+ public function handleRequest(AphrontRequest $request) {
+ $viewer = $request->getViewer();
$chrono_key = $request->getStr('chronoKey');
- $user = $request->getUser();
if ($request->isDialogFormPost()) {
$table = new PhabricatorFeedStoryNotification();
@@ -16,7 +15,7 @@
'UPDATE %T SET hasViewed = 1 '.
'WHERE userPHID = %s AND hasViewed = 0 and chronologicalKey <= %s',
$table->getTableName(),
- $user->getPHID(),
+ $viewer->getPHID(),
$chrono_key);
return id(new AphrontReloadResponse())
@@ -24,7 +23,7 @@
}
$dialog = new AphrontDialogView();
- $dialog->setUser($user);
+ $dialog->setUser($viewer);
$dialog->addCancelButton('/notification/');
if ($chrono_key) {
$dialog->setTitle(pht('Really mark all notifications as read?'));
diff --git a/src/applications/notification/controller/PhabricatorNotificationIndividualController.php b/src/applications/notification/controller/PhabricatorNotificationIndividualController.php
--- a/src/applications/notification/controller/PhabricatorNotificationIndividualController.php
+++ b/src/applications/notification/controller/PhabricatorNotificationIndividualController.php
@@ -3,9 +3,8 @@
final class PhabricatorNotificationIndividualController
extends PhabricatorNotificationController {
- public function processRequest() {
- $request = $this->getRequest();
- $viewer = $request->getUser();
+ public function handleRequest(AphrontRequest $request) {
+ $viewer = $request->getViewer();
$stories = id(new PhabricatorNotificationQuery())
->setViewer($viewer)
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
@@ -3,15 +3,11 @@
final class PhabricatorNotificationListController
extends PhabricatorNotificationController {
- private $queryKey;
+ public function handleRequest(AphrontRequest $request) {
+ $querykey = $request->getURIData('queryKey');
- public function willProcessRequest(array $data) {
- $this->queryKey = idx($data, 'queryKey');
- }
-
- public function processRequest() {
$controller = id(new PhabricatorApplicationSearchController())
- ->setQueryKey($this->queryKey)
+ ->setQueryKey($querykey)
->setSearchEngine(new PhabricatorNotificationSearchEngine())
->setNavigation($this->buildSideNavView());
@@ -19,13 +15,13 @@
}
public function buildSideNavView() {
- $user = $this->getRequest()->getUser();
+ $viewer = $this->getViewer();
$nav = new AphrontSideNavFilterView();
$nav->setBaseURI(new PhutilURI($this->getApplicationURI()));
id(new PhabricatorNotificationSearchEngine())
- ->setViewer($user)
+ ->setViewer($viewer)
->addNavigationItems($nav->getMenu());
$nav->selectFilter(null);
diff --git a/src/applications/notification/controller/PhabricatorNotificationPanelController.php b/src/applications/notification/controller/PhabricatorNotificationPanelController.php
--- a/src/applications/notification/controller/PhabricatorNotificationPanelController.php
+++ b/src/applications/notification/controller/PhabricatorNotificationPanelController.php
@@ -3,14 +3,12 @@
final class PhabricatorNotificationPanelController
extends PhabricatorNotificationController {
- public function processRequest() {
-
- $request = $this->getRequest();
- $user = $request->getUser();
+ public function handleRequest(AphrontRequest $request) {
+ $viewer = $request->getViewer();
$query = id(new PhabricatorNotificationQuery())
- ->setViewer($user)
- ->withUserPHIDs(array($user->getPHID()))
+ ->setViewer($viewer)
+ ->withUserPHIDs(array($viewer->getPHID()))
->setLimit(15);
$stories = $query->execute();
@@ -81,7 +79,7 @@
$connection_ui);
$unread_count = id(new PhabricatorFeedStoryNotification())
- ->countUnread($user);
+ ->countUnread($viewer);
$json = array(
'content' => $content,
diff --git a/src/applications/notification/controller/PhabricatorNotificationStatusController.php b/src/applications/notification/controller/PhabricatorNotificationStatusController.php
--- a/src/applications/notification/controller/PhabricatorNotificationStatusController.php
+++ b/src/applications/notification/controller/PhabricatorNotificationStatusController.php
@@ -3,7 +3,8 @@
final class PhabricatorNotificationStatusController
extends PhabricatorNotificationController {
- public function processRequest() {
+ public function handleRequest(AphrontRequest $request) {
+
try {
$status = PhabricatorNotificationClient::getServerStatus();
$status = $this->renderServerStatus($status);
diff --git a/src/applications/notification/controller/PhabricatorNotificationTestController.php b/src/applications/notification/controller/PhabricatorNotificationTestController.php
--- a/src/applications/notification/controller/PhabricatorNotificationTestController.php
+++ b/src/applications/notification/controller/PhabricatorNotificationTestController.php
@@ -3,9 +3,8 @@
final class PhabricatorNotificationTestController
extends PhabricatorNotificationController {
- public function processRequest() {
- $request = $this->getRequest();
- $viewer = $request->getUser();
+ public function handleRequest(AphrontRequest $request) {
+ $viewer = $request->getViewer();
$story_type = 'PhabricatorNotificationTestFeedStory';
$story_data = array(
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Thu, Nov 7, 11:44 AM (1 w, 5 d ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
6735214
Default Alt Text
D13767.diff (6 KB)
Attached To
Mode
D13767: Update Notifications for handleRequest
Attached
Detach File
Event Timeline
Log In to Comment