/**
  * Copies and merges the marked threads.
  */
 public function copyAndMerge()
 {
     if ($this->thread == null) {
         throw new IllegalLinkException();
     }
     $this->board->checkModeratorPermission('canMergeThread');
     $this->thread->copyAndMerge($this->threadIDs);
     ThreadEditor::unmarkAll();
     // set last post
     $this->board->refresh();
     $this->board->setLastPosts();
     self::resetCache();
     HeaderUtil::redirect('index.php?page=Thread&threadID=' . $this->thread->threadID . SID_ARG_2ND_NOT_ENCODED);
     exit;
 }