blob: b3b8fa39ec0b70b08d04e3b2476ef4b50dfa91ab [file] [log] [blame]
* Copyright (c) 2010, 2015 Eclipse Foundation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* Contributors:
* Wayne Beaton (Eclipse Foundation)- initial API and implementation
* This script generates an RSS feed of recent Eclipse review/proposal
* activity. By default, it shows the last 90 days of activity. This value
* can be tuned by providing the 'age' get parameter. For example, to obtain
* information for the past thirty-day, call this script as follows:
* Known issues: Links may not be encoded correctly on all URLs.
//header("Content-Type: application/rss+xml");
require_once($_SERVER['DOCUMENT_ROOT'] . "/");
require_once($_SERVER['DOCUMENT_ROOT'] . "/projects/classes/");
require_once($_SERVER['DOCUMENT_ROOT'] . "/projects/classes/debug.php");
$App = new App();
$age = 30;
if (isset($_GET['age'])) {
$value = $_GET['age'];
if (is_numeric($value) && $value > 0) $age = $value;
<rss version="2.0">
<title>Eclipse Reviews</title>
Upcoming reviews of Projects and
Proposals at the Eclipse Foundation.
<?= date('r', strtotime("now")) ?>
Review::get(strtotime("-${age} days"), function($activity) {
if ($activity->isPending()) return;
$project = Project::getProject($activity->getProjectId());
$title = htmlentities("{$project->getFormalName()} {$activity->getName()}");
$link = $activity->getUrl();
$date = date('r', $activity->getDate());
$guid = sha1($link);
echo "<item>\n";
echo "\t<title>$title</title>\n";
echo "\t<link>$link</link>\n";
echo "\t<pubDate>$date</pubDate>\n";
echo "\t<guid isPermaLink=\"false\">$guid</guid>\n";
echo "</item>\n";