예제 #1
0
 /**
  * Save the ordering of entries
  *
  * @return     void
  */
 public function saveorderTask()
 {
     // Check for request forgeries
     Request::checkToken();
     // Incoming
     $order = Request::getVar('order', array(), 'post', 'array');
     Arr::toInteger($order);
     // Instantiate an object
     $jc = new JobCategory($this->database);
     if (count($order) > 0) {
         foreach ($order as $id => $num) {
             $jc->updateOrder($id, $num);
         }
     }
     // Redirect
     App::redirect(Route::url('index.php?option=' . $this->_option . '&controller=' . $this->_controller, false), Lang::txt('COM_JOBS_ORDER_SAVED'));
 }