<?php // Copyright 2014 Peter Beverloo. All rights reserved. // Use of this source code is governed by the MIT license, a copy of which can // be found in the LICENSE file. require_once __DIR__ . '/../services/framework/Database.php'; require_once __DIR__ . '/framework/GetCommits.php'; Header('Access-Control-Allow-Origin: *'); $version = trim(file_get_contents(__DIR__ . '/../VERSION')); $database = new Database(); $commits = GetCommits($database); if ($_SERVER['QUERY_STRING'] == 'rss') { $first_commit = current($commits); $first_date = strtotime($first_commit['revision_date']); Header('Content-Type: application/rss+xml'); echo '<?xml version="1.0" encoding="UTF-8" ?>' . PHP_EOL; ?> <rss version="2.0"> <channel> <title>Highlights from recent Chromium, Blink, Skia and v8 commits</title> <description>This feed contains a selection from all Chromium, Blink, Skia and v8 commits, pointing out changes which might be interesting for a wider audience.</description> <link>https://commits.peter.sh/</link> <lastBuildDate><?php echo date(DateTime::RSS, $first_date); ?> </lastBuildDate> <pubDate><?php echo date(DateTime::RSS, $first_date); ?> </pubDate> <ttl>3600</ttl>
<?php // Copyright 2014 Peter Beverloo. All rights reserved. // Use of this source code is governed by the MIT license, a copy of which can // be found in the LICENSE file. require_once __DIR__ . '/../services/framework/Database.php'; require_once __DIR__ . '/framework/GetCommits.php'; Header('Access-Control-Allow-Origin: *'); $version = trim(file_get_contents(__DIR__ . '/../VERSION')); $start_date = date('Y-m-d', strtotime('-2 weeks')); $end_date = date('Y-m-d'); $projects = array(1, 2, 3, 4); if (isset($_GET['projects'])) { $projects = explode(',', $_GET['projects']); } $commits = GetCommits($start_date, $end_date, $projects); if ($_SERVER['QUERY_STRING'] == 'rss') { $first_commit = current($commits); $first_date = strtotime($first_commit['revision_date']); Header('Content-Type: application/rss+xml'); echo '<?xml version="1.0" encoding="UTF-8" ?>' . PHP_EOL; ?> <rss version="2.0"> <channel> <title>Highlights from recent Chromium, Blink, Skia and v8 commits</title> <description>This feed contains a selection from all Chromium, Blink, Skia and v8 commits, pointing out changes which might be interesting for a wider audience.</description> <link>https://commits.peter.sh/</link> <lastBuildDate><?php echo date(DateTime::RSS, $first_date); ?> </lastBuildDate>