Beispiel #1
0
 function execute()
 {
     $default_feed = new AMPContent_RSSFeed(AMP_Registry::getDbcon());
     $default_feed->setDefaults();
     $default_feed->mergeData(array("title" => "Latest Updates", "description" => "The most recently added pages on this website"));
     array_unshift($this->_source, $default_feed);
     return parent::execute();
 }
Beispiel #2
0
<?php

require_once 'AMP/BaseDB.php';
require_once 'AMP/Content/RSS/Feed.inc.php';
$feed_id = isset($_GET['feed']) && $_GET['feed'] ? intval($_GET['feed']) : null;
if (!$feed_id) {
    $feed_id = isset($_GET['id']) && $_GET['id'] ? intval($_GET['id']) : null;
}
$section_id = isset($_GET['section']) && $_GET['section'] ? $_GET['section'] : false;
$class_id = isset($_GET['class']) && $_GET['class'] ? $_GET['class'] : false;
$feed = new AMPContent_RSSFeed($dbcon, $feed_id);
if ($section_id) {
    $feed->setSection($section_id);
}
if ($class_id) {
    $feed->setClass($class_id);
}
if ($class_id && $section_id) {
    $feed->setCombineLogic();
}
$feed->getDataSource();
if ($display =& $feed->getDisplay()) {
    $display->execute();
}