public function getSingle($id, $language = 'nl') { $db = Zend_Registry::get('db'); $select = $db->select()->from(array('p' => 'PagePictures'), array('*'))->joinLeft(array('t' => 'PagePicturesTsl'), 'p.picture_id = t.picture_id')->where('p.picture_id = ?', $id); $stm = $db->query($select); $row = current($stm->fetchAll()); $picture = new SxCms_Page_Picture(); $picture->setPictureId($row['picture_id'])->setPageId($row['page_id'])->setFile($row['file'])->setText($row['text'])->setPlace($row['place'])->setSeason($row['season']); return $picture; }
public function textupdateAction() { if ($this->getRequest()->isPost()) { $lng = $_SESSION['System']['lng']; $text = $this->_getParam('text'); $picture_id = $this->_getParam('picture_id'); $picture = new SxCms_Page_Picture(); $picture->setPictureId($picture_id); $picture->setText($text); $picture->setSeason(0); $picture->saveUpdate($lng); $this->_helper->layout()->disableLayout(); $this->view->result = Zend_Json::encode(array('success' => true)); $this->render('result'); } }