Beispiel #1
0
 public function reportAction()
 {
     $this->noViewRenderer(true);
     $request = $this->getRequest();
     if (!JO_Session::get('user_id')) {
         JO_Session::set('msg_error', $this->translate('You must be logged to change your profile'));
         $this->redirect(WM_Router::create($request->getBaseUrl() . '?controller=users&action=login'));
     }
     if ($request->getRequest('report')) {
         $s = Model_Comments::report($request->getRequest('report'));
         JO_Session::set('msg_success', $this->translate('Thank you for reporting the comment'));
     }
     $this->redirect($request->getServer('HTTP_REFERER'));
 }