getPageById($row['idPage']); $row['url'] = BASE_URL . '/' . $page['fullAlias']; break; case 'link': break; case 'file': $row['url'] = Qs_FileFs::getUrl($row['file']); break; case 'none': $row['url'] = ''; break; default: break; } return $this; } public function getFeedData() { $feed = array(); $feed['title'] = SITE_NAME; $feed['link'] = BASE_URL_LANGUAGE . '/' . CURRENT_PAGE; $feed['published'] = gmdate('D, d M Y H:i:s'); $feed['charset'] = 'utf-8'; $feed['language'] = 'en-us'; $maxItems = (int) $this->maxFeedItemCount; $list = $this->setSelectOptions(array('order' => 'date DESC', 'limit' => $maxItems))->getList(); foreach ($list as $item) { $feedItem = array( 'title' => $item['title'], 'link' => BASE_URL_LANGUAGE . '/' . CURRENT_PAGE_FINAL . '/' . ((empty($item['alias'])) ? $item['id'] : $item['alias']), 'lastUpdate' => strtotime($item['date']) ); if (empty($item['introduction'])) { $feedItem['description'] = $item['content']; } else { $feedItem['description'] = htmlspecialchars($item['introduction']) . ' ' . '[Read more]'; } $feed['entries'][] = $feedItem; } return $feed; } protected function _getFromDbSelect($primaryKey) { $select = parent::_getFromDbSelect($primaryKey); $this->_filterEnabled($select); $this->_filterPublished($select); return $select; } protected function _filter(Zend_Db_Select $select) { $this->_filterEnabled($select); $this->_filterPublished($select); return parent::_filter($select); } protected function _filterPublished(Zend_Db_Select $select) { $select->where('CURRENT_DATE() >= `' . $this->_tableAlias . '`.`date`'); return $this; } }