Esempio n. 1
0
 /**
  * Marks a personal notification as read by the user so it won't be displayed
  * in the list in the header.
  * @param string $id : hash-id of the notification
  */
 public function mark_notification_read_action($id)
 {
     PersonalNotifications::markAsRead($id);
     if (Request::isXhr()) {
         $this->render_nothing();
     } else {
         $notification = new PersonalNotifications($id);
         if ($notification->url) {
             $this->redirect(URLHelper::getUrl(TransformInternalLinks($notification->url)));
         } else {
             $this->render_nothing();
         }
     }
 }