/** * Trashes the selected thread. */ public function trash() { if (!THREAD_ENABLE_RECYCLE_BIN || !$this->board->getModeratorPermission('canDeleteThread')) { return; } if ($this->thread != null && !$this->thread->isDeleted) { $this->thread->trash(true, $this->reason); $this->removeThread(); } if (strpos($this->url, 'page=Thread') !== false) { HeaderUtil::redirect('index.php?page=Board&boardID=' . $this->thread->boardID . SID_ARG_2ND_NOT_ENCODED); } else { HeaderUtil::redirect($this->url); } exit; }