Beispiel #1
0
 public function addAction()
 {
     $this->view->post_data = $this->_request->getParams();
     if ($this->_request->isPost()) {
         $post_data = $this->_request->getParams();
         var_dump($post_data);
         echo $post_data['commentbody'];
         if (!empty($post_data['commentbody'])) {
             var_dump($post_data);
             $comment = new Application_Model_Comment();
             $comment->addComment($post_data);
         } else {
             $post = new Application_Model_Post();
             $this->view->post_id = $post->addPost($post_data);
             $this->view->post_data = $this->_request->getParams();
         }
     }
 }