/** * Moves the marked threads with link. */ public function moveWithLink() { if ($this->board == null) { throw new IllegalLinkException(); } $this->board->checkModeratorPermission('canMoveThread'); list($boards, $boardIDs) = ThreadEditor::getBoards($this->threadIDs); // check permissions foreach ($boards as $board) { $board->checkModeratorPermission('canMoveThread'); } ThreadEditor::createLinks($this->threadIDs, $this->boardID); ThreadEditor::moveAll($this->threadIDs, $this->boardID); ThreadEditor::unmarkAll(); // refresh counts BoardEditor::refreshAll($boardIDs . ',' . $this->board->boardID); // set last post $this->board->setLastPosts(); foreach ($boards as $board) { $board->setLastPosts(); } self::resetCache(); HeaderUtil::redirect($this->url); exit; }