if ((strlen($in)==0) && isset($GLOBALS['description_notnull']) && $GLOBALS['description_notnull']) {
$in = "No description available.";
}
- return htmlspecialchars($in);
+ return htmlspecialchars(nl2br($in));
}
// callback is optional function name which should be called for each project
if (!$desription) $desription=$title;
// one time output
print " <channel>\n";
- print " <copyright>Copyright ".date("Y")." ".fusionforge_get_config ('forge_name')."</copyright>\n";
+ print " <copyright>Copyright ".date("Y")." ".forge_get_config ('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://".forge_get_config ('web_host')."/</link>\n";
print " <title>$title</title>\n";
- print " <webMaster>".$GLOBALS['sys_admin_email']."</webMaster>\n";
+ print " <webMaster>".forge_get_config ('admin_email')."</webMaster>\n";
print " <language>en-us</language>\n";
// item outputs
$addendum = '' ;
while ($row = db_fetch_array($res)) {
- if ($callback) {
- $addendum=$callback($row);
- }
+ if (!forge_check_perm ('project_read', $row['group_id'])) {
+ continue ;
+ }
+ if ($callback) {
+ $addendum=$callback($row);
+ }
print " <item>\n";
print " <title>".htmlspecialchars($row['group_name'])."</title>\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 $addendum;
print "</description>\n";
print " </item>\n";
}
print " </channel>\n";
}
-?>
\ No newline at end of file
+?>