コード例 #1
0
ファイル: article.php プロジェクト: rockylo/ionize
 /** 
  * Saves article ordering
  *
  * @param	string	$parent
  * @param	int		$id_parent
  */
 public function save_ordering($parent, $id_parent)
 {
     if (!Authority::can('move', 'admin/article')) {
         $this->error(lang('permission_denied'));
     }
     $order = $this->input->post('order');
     if ($order !== FALSE) {
         // Clear the cache
         Cache()->clear_cache();
         // Saves the new ordering
         $this->article_model->save_ordering($order, $parent, $id_parent);
         // Update the panels
         $this->callback = array('fn' => 'ION.updateArticleOrder', 'args' => array('id_page' => $id_parent, 'order' => $order));
         // Answer send
         $this->success(lang('ionize_message_article_ordered'));
     } else {
         // Answer send
         $this->error(lang('ionize_message_operation_nok'));
     }
 }