/** * Reorders types * * @return void */ public function reorderTask($dir = 0) { // Check for request forgeries Request::checkToken(); // Incoming $id = Request::getVar('id', array(0), '', 'array'); // Load row $row = new \Components\Publications\Tables\MasterType($this->database); $row->load((int) $id[0]); // Update order $row->changeOrder($dir); App::redirect(Route::url('index.php?option=' . $this->_option . '&controller=' . $this->_controller, false)); }