diff options
Diffstat (limited to 'app/Controller/WebNotification.php')
-rw-r--r-- | app/Controller/WebNotification.php | 50 |
1 files changed, 0 insertions, 50 deletions
diff --git a/app/Controller/WebNotification.php b/app/Controller/WebNotification.php deleted file mode 100644 index a62da0e3..00000000 --- a/app/Controller/WebNotification.php +++ /dev/null @@ -1,50 +0,0 @@ -<?php - -namespace Kanboard\Controller; - -/** - * Web notification controller - * - * @package controller - * @author Frederic Guillot - */ -class WebNotification extends BaseController -{ - /** - * Mark all notifications as read - * - * @access public - */ - public function flush() - { - $user_id = $this->getUserId(); - - $this->userUnreadNotification->markAllAsRead($user_id); - $this->response->redirect($this->helper->url->to('DashboardController', 'notifications', array('user_id' => $user_id))); - } - - /** - * Mark a notification as read - * - * @access public - */ - public function remove() - { - $user_id = $this->getUserId(); - $notification_id = $this->request->getIntegerParam('notification_id'); - - $this->userUnreadNotification->markAsRead($user_id, $notification_id); - $this->response->redirect($this->helper->url->to('DashboardController', 'notifications', array('user_id' => $user_id))); - } - - private function getUserId() - { - $user_id = $this->request->getIntegerParam('user_id'); - - if (! $this->userSession->isAdmin() && $user_id != $this->userSession->getId()) { - $user_id = $this->userSession->getId(); - } - - return $user_id; - } -} |