Exemplo n.º 1
0
 /** 
  * Saves categories ordering
  *
  * @param	bool|string		$parent
  * @param	bool|int		$id_parent
  */
 public function save_ordering($parent = FALSE, $id_parent = FALSE)
 {
     $order = $this->input->post('order');
     if ($order != FALSE) {
         // Saves the new ordering
         $this->category_model->save_ordering($order);
         if ($parent != FALSE) {
             // Update Array for JSON
             $this->update[] = array('element' => 'categories', 'url' => admin_url() . 'category/get_select/' . $parent . '/' . $id_parent);
         }
         // Answer
         $this->success(lang('ionize_message_operation_ok'));
     } else {
         $this->error(lang('ionize_message_operation_nok'));
     }
 }