* Copyright 1999-2001 (c) VA Linux Systems
* http://sourceforge.net
*
- * @version $Id$
- *
*/
+require_once('../env.inc.php');
+require_once $gfwww.'include/pre.php'; // Initial db and session library, opens session
function rss_setscheme() {
if ($GLOBALS['scheme'] == "netscape") {
}
}
+function rss_date($date) {
+ return gmdate('D, d M Y H:i:s', $date).' GMT';
+}
+
function rss_description ($in) {
// if description_maxlen is defined, then truncate appropriately
// added for netscape rss schema compat
$in = substr($in,0,$GLOBALS['description_maxlen']);
}
// according to netscape, this cannot be blank
- if ((strlen($in)==0) && $GLOBALS['description_notnull']) {
+ if ((strlen($in)==0) && isset($GLOBALS['description_notnull']) && $GLOBALS['description_notnull']) {
$in = "No description available.";
}
return htmlspecialchars($in);
// row and which result will be appended to description element
function rss_dump_project_result_set ($res,$title,$desription='',$callback=0) {
if (!$desription) $desription=$title;
- // ## one time output
+ // one time output
print " <channel>\n";
- print " <copyright>Copyright 1999-2000 VA Linux Systems, Inc.</copyright>\n";
- print " <pubDate>".gmdate('D, d M Y g:i:s',time())." GMT</pubDate>\n";
+ print " <copyright>Copyright ".date("Y")." ".fusionforge_get_config ('core', 'forge_name')."</copyright>\n";
+ print " <pubDate>".rss_date(time())."</pubDate>\n";
print " <description>$desription</description>\n";
- print " <link>http://$GLOBALS[sys_default_domain]</link>\n";
+ print " <link>http://".$GLOBALS['sys_default_domain']."/</link>\n";
print " <title>$title</title>\n";
- print " <webMaster>webmaster@$GLOBALS[sys_default_domain]</webMaster>\n";
+ print " <webMaster>".$GLOBALS['sys_admin_email']."</webMaster>\n";
print " <language>en-us</language>\n";
- // ## item outputs
+ // item outputs
+ $addendum = '' ;
while ($row = db_fetch_array($res)) {
if ($callback) {
$addendum=$callback($row);
}
print " <item>\n";
print " <title>".htmlspecialchars($row['group_name'])."</title>\n";
- print " <link>".util_make_url_p ($row['unix_group_name'],$row['group_id'])."</link>\n";
+ print " <link>".util_make_url_g ($row['unix_group_name'],$row['group_id'])."</link>\n";
print " <description>";
print ereg_replace(" *\r*\n *"," ",rss_description($row['short_description']));
print $addendum;
print "</description>\n";
print " </item>\n";
}
- // ## end output
+ // end output
print " </channel>\n";
}
-?>
+?>
\ No newline at end of file