<?php
class DeleteAction extends ForumAction
{
    public function run()
    {
        $this->isManager();
        
        $chat = Chat::single($this->id());
        $cid = S::gp('cid','G',2);
    	$chat->delete($cid);

        iforward($this->getController()->url('system',array('s'=>'forum','c'=>'chat','id'=>$this->id())));
    }
}