public function getcommentsAction() { if ($this->authIdentity->userid) { $imageid = $this->getRequest()->getParam('imageid'); $from = $this->getRequest()->getParam('from'); $ImageModel = new Application_Model_Images($this->registry->DB); if (empty($from) && !(is_int($from) || ctype_digit($from))) { $from = 0; } $results = $ImageModel->getComments($imageid, $from); $this->view->imageid = $imageid; $this->view->results = $results['result']; $this->view->maxcomment = $results['maxcomment']; } }