Beispiel #1
0
 /**
  * Resets the ranking of a resource
  * Redirects to edit task for the resource
  *
  * @return  void
  */
 public function resetrankingTask()
 {
     // Check for request forgeries
     Request::checkToken();
     // Incoming
     $id = Request::getInt('id', 0);
     if ($id) {
         // Load the object, reset the ratings, save, checkin
         $row = new Tables\Publication($this->database);
         $row->load($id);
         $row->ranking = '0';
         $row->store();
         $row->checkin();
         $this->_message = Lang::txt('COM_PUBLICATIONS_SUCCESS_RANKING_RESET');
     }
     // Redirect
     App::redirect(Route::url('index.php?option=' . $this->_option . '&controller=' . $this->_controller . '&task=edit&id[]=' . $id, false), $this->_message);
 }