cvs: pearweb /public_html rss.php
| From: | Martin Jansen | Date: | Wed, 14 Aug 2002 10:37:16 +0000 |
| Subject: | cvs: pearweb /public_html rss.php | ||
| Groups: | php.pear.cvs | ||
| Request: | Send a blank email to pear-cvs+get-5740@lists.php.net to get a copy of this message | ||
mj Wed Aug 14 06:37:16 2002 EDT
Modified files:
/pearweb/public_html rss.php
Log:
* Show 10 instead of 5 items per default.
* Add language tag.
Index: pearweb/public_html/rss.php
diff -u pearweb/public_html/rss.php:1.5 pearweb/public_html/rss.php:1.6
--- pearweb/public_html/rss.php:1.5 Sat Jul 27 06:51:09 2002
+++ pearweb/public_html/rss.php Wed Aug 14 06:37:16 2002
@@ -15,18 +15,18 @@
+----------------------------------------------------------------------+
| Authors: Martin Jansen <mj@php.net> |
+----------------------------------------------------------------------+
- $Id: rss.php,v 1.5 2002/07/27 10:51:09 mj Exp $
+ $Id: rss.php,v 1.6 2002/08/14 10:37:16 mj Exp $
*/
/**
* This script creates an RSS file that contains the latest
* PEAR releases. The default number of releases thar are
- * listed is 5. The number can be specified by the GET parameter
+ * listed is 10. The number can be specified by the GET parameter
* "limit".
*/
if (!isset($_GET['limit']) || $_GET['limit'] == "") {
- $limit = 5;
+ $limit = 10;
} else {
$limit = (int)$_GET['limit'];
@@ -44,6 +44,7 @@
<title>PEAR</title>
<link>http://pear.php.net/</link>
<description>This is a list containing the latest releases from PEAR.</description>
+ <language>en</language>
<image>
<url>http://pear.php.net/gifs/pearsmall.gif</url>
<title>PEAR</title>
@@ -53,7 +54,8 @@
</image>
<?php
-foreach (release::getRecent($limit) as $release) {
+$releases = release::getRecent($limit);
+foreach ($releases as $release) {
echo " <item>\n";
echo " <title>" . $release['name'] . "</title>\n";
echo " <pubDate>" . $release['releasedate'] .
"</pubDate>\n";