Example #1
0
 /**
  * Reorder a plugin
  *
  * @return  void
  */
 public function orderTask()
 {
     // Check for request forgeries
     Request::checkToken();
     $id = Request::getVar('id', array(0), 'post', 'array');
     \Hubzero\Utility\Arr::toInteger($id, array(0));
     $uid = $id[0];
     $inc = $this->_task == 'orderup' ? -1 : 1;
     $row = new Tables\Page($this->database);
     $row->load($uid);
     $row->move($inc, 'course_id=' . $this->database->Quote($row->course_id) . ' AND offering_id=' . $this->database->Quote($row->offering_id));
     $row->reorder('course_id=' . $this->database->Quote($row->course_id) . ' AND offering_id=' . $this->database->Quote($row->offering_id));
     $this->cancelTask();
 }