/** * @see Action::execute() */ public function execute() { parent::execute(); // check permission WCF::getUser()->checkPermission('admin.board.canEditBoard'); // delete old positions $sql = "TRUNCATE wbb" . WBB_N . "_board_structure"; WCF::getDB()->sendQuery($sql); // update postions foreach ($this->positions as $boardID => $data) { foreach ($data as $parentID => $position) { BoardEditor::updatePosition(intval($boardID), intval($parentID), $position); } } // insert default values $sql = "INSERT IGNORE INTO\twbb" . WBB_N . "_board_structure\n\t\t\t\t\t\t(parentID, boardID)\n\t\t\tSELECT\t\t\tparentID, boardID\n\t\t\tFROM\t\t\twbb" . WBB_N . "_board"; WCF::getDB()->sendQuery($sql); // reset cache WCF::getCache()->clearResource('board'); $this->executed(); // forward to list page HeaderUtil::redirect('index.php?page=BoardList&successfulSorting=1&packageID=' . PACKAGE_ID . SID_ARG_2ND_NOT_ENCODED); exit; }