Esempio n. 1
0
 public function askquestionAction()
 {
     $this->_helper->viewRenderer->setNoRender(true);
     if ($this->auth->hasIdentity()) {
         $askquestion = new Application_Model_forum($this->registry['DB']);
         $tags = $this->getRequest()->getParam('tags');
         $tags = explode(',', $tags);
         $question = $this->getRequest()->getParam('question');
         $description = $this->getRequest()->getParam('description');
         $this->view->results = $askquestion->askQuestion($tags, $question, $description);
         echo json_encode(array('status' => 'success'));
     } else {
         echo json_encode(array('status' => 'error'));
     }
 }