/**
  * Changes the topic of the selected post.
  */
 public function changeTopic()
 {
     if (!$this->board->getModeratorPermission('canEditPost')) {
         return;
     }
     if ($this->post != null) {
         $this->post->setSubject($this->topic);
         if (!empty($this->topic) && $this->thread != null && $this->thread->firstPostID == $this->post->postID) {
             $this->thread->setTopic($this->topic, false);
         }
     }
 }
 /**
  * Changes the topic of the selected thread.
  */
 public function changeTopic()
 {
     if (!$this->board->getModeratorPermission('canEditPost')) {
         return;
     }
     if (!empty($this->topic) && $this->thread != null) {
         $this->thread->setTopic($this->topic);
         if ($this->thread->lastPostTime == $this->board->getLastPostTime()) {
             WCF::getCache()->clearResource('boardData', true);
         }
     }
 }