Ejemplo n.º 1
0
 function save_order_action()
 {
     ForumPerm::check('sort_area', $this->getId());
     foreach (Request::getArray('areas') as $category_id => $areas) {
         $pos = 0;
         foreach ($areas as $area_id) {
             ForumPerm::checkCategoryId($this->getId(), $category_id);
             ForumPerm::check('sort_area', $this->getId(), $area_id);
             ForumCat::addArea($category_id, $area_id);
             ForumCat::setAreaPosition($area_id, $pos);
             $pos++;
         }
     }
     $this->render_nothing();
 }
Ejemplo n.º 2
0
 /**
  * Save the ordering of the categories
  */
 function savecats_action()
 {
     ForumPerm::check('sort_category', $this->getId());
     $pos = 0;
     foreach (Request::getArray('categories') as $category_id) {
         ForumPerm::checkCategoryId($this->getId(), $category_id);
         ForumCat::setPosition($category_id, $pos);
         $pos++;
     }
     $this->render_nothing();
 }