Beispiel #1
0
 /** Slett forumsvaret */
 public function delete()
 {
     // kontroller tilgang til forumsvaret
     if (!$this->require_access()) {
         return;
     }
     // allerede slettet?
     if ($this->info['fr_deleted'] != 0) {
         $this->delete_dupe();
         return;
     }
     // er forumtråden låst?
     if ($this->topic->info['ft_locked'] != 0 && !$this->topic->forum->fmod) {
         $this->delete_error_locked();
         return;
     }
     // kontroller blokkering
     if ($this->topic->forum->check_block()) {
         return;
     }
     // slett forumsvaret
     if (!$this->delete_action()) {
         // anta at det allerede er slettet
         $this->delete_dupe();
         return;
     }
     // logg
     \Kofradia\Forum\Log::add_reply_deleted($this);
     // fullført
     $this->delete_complete();
 }