Example #1
0
 public function sort_orderAction()
 {
     $this->setInvokeArg('noViewRenderer', true);
     $sort_order_data = $this->getRequest()->getPost('sort_order');
     foreach ($sort_order_data as $sort_order => $page_id) {
         if ($page_id) {
             Model_Pages::changeSortOrder($page_id, $sort_order);
         }
     }
     echo 1;
 }
Example #2
0
 public function sort_orderAction()
 {
     $this->noViewRenderer(true);
     if (!WM_Users::allow('edit', $this->getRequest()->getController())) {
         echo $this->translate('You do not have permission to this action');
     } else {
         $sort_order_data = $this->getRequest()->getPost('sort_order');
         foreach ($sort_order_data as $sort_order => $post_id) {
             if ($post_id) {
                 Model_Pages::changeSortOrder($post_id, $sort_order);
             }
         }
         echo 'ok';
     }
 }