Beispiel #1
0
 public function initialize()
 {
     $this->post = $this->modx->getObject('disPost', $this->getProperty('post', false));
     if (empty($this->post)) {
         $this->discuss->sendErrorPage();
     }
     $this->thread = $this->modx->call('disThread', 'fetch', array(&$this->modx, $this->post->get('thread')));
     if (empty($this->thread)) {
         $this->discuss->sendErrorPage();
     }
     /* ensure user can report this post */
     if (!$this->post->canReport()) {
         $this->modx->sendRedirect($this->thread->getUrl());
     }
 }