/**
  * Trashes the selected post.
  */
 public function trash($ignorePermission = false)
 {
     if (!THREAD_ENABLE_RECYCLE_BIN || !$ignorePermission && !$this->board->getModeratorPermission('canDeletePost')) {
         return;
     }
     if ($this->post != null && !$this->post->isDeleted) {
         $this->post->trash($this->reason);
         $this->thread->checkVisibility($this->reason);
         $this->removePost();
     }
 }