Example #1
0
 protected function runResort($iblockId)
 {
     return CIBlockSection::treeReSort($iblockId);
 }
 protected function runResorting()
 {
     if ($this->isStepFinished(__METHOD__)) {
         return;
     }
     $lastId = $this->getLastIblockId();
     $q = CIBlock::GetList(array("ID" => "ASC"), array("TYPE" => "library", ">ID" => $lastId));
     if ($q) {
         while ($iblock = $q->fetch()) {
             $this->abortIfNeeded();
             CIBlockSection::treeReSort($iblock['ID']);
             $this->storeIblockId($iblock['ID']);
         }
     }
     $this->storeIblockId(0);
     $this->setStepFinished(__METHOD__);
 }