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->getList(array('order' => 'date DESC', 'limit' => $maxItems)); 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 _filter(Zend_Db_Select $select) { $select->where('`' . $this->_tableAlias . '`.`enabled` = "y"'); return parent::_filter($select); } }