/**
* http://fusionforge.org/
*
- * This file is part of FusionForge.
- *
- * FusionForge is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
+ * This file is part of FusionForge. FusionForge is free software;
+ * you can redistribute it and/or modify it under the terms of the
+ * GNU General Public License as published by the Free Software
+ * Foundation; either version 2 of the Licence, or (at your option)
+ * any later version.
*
* FusionForge is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
- * You should have received a copy of the GNU General Public License
- * along with FusionForge; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * You should have received a copy of the GNU General Public License along
+ * with FusionForge; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
// export projects release news in RSS 2.0
if ($limit > 100) $limit = 100;
if ($group_id) {
- $res = db_query_params ('SELECT group_name FROM groups WHERE group_id=$1 AND is_public=1',
+ session_require_perm('project_read', $group_id);
+
+ $res = db_query_params ('SELECT group_name FROM groups WHERE group_id=$1',
array($group_id),
1);
$row = db_fetch_array($res);
FROM news_bytes, groups g,users u
WHERE news_bytes.group_id=g.group_id
AND u.user_id=news_bytes.submitted_by
-AND g.is_public=1
AND g.status=$1
AND news_bytes.is_approved <> 4
AND (g.group_id=$2 OR 1 != $3)
// ## item outputs
while ($row = db_fetch_array($res)) {
- print " <item>\n";
- print " <title>".htmlspecialchars($row['summary'])."</title>\n";
// if news group, link is main page
if ($row['group_id'] != forge_get_config('news_group')) {
- print " <link>http://".forge_get_config('web_host')."/forum/forum.php?forum_id=".$row['forum_id']."</link>\n";
+ $link = util_make_url("/forum/forum.php?forum_id=".$row['forum_id']);
} else {
- print " <link>http://".forge_get_config('web_host')."/</link>\n";
+ $link = util_make_url('/');
}
+ print " <item>\n";
+ print " <title>".htmlspecialchars($row['summary'])."</title>\n";
+ print " <link>$link</link>\n";
print " <description>".rss_description($row['details'])."</description>\n";
print " <author>".$row['user_name']."@".forge_get_config('users_host')." (".$row['realname'].")</author>\n";
print " <pubDate>".rss_date($row['post_date'])."</pubDate>\n";
- if ($row['group_id'] != forge_get_config('news_group')) {
- print " <guid>http://".forge_get_config('web_host')."/forum/forum.php?forum_id=".$row['forum_id']."</guid>\n";
- } else {
- print " <guid>http://".forge_get_config('web_host')."/</guid>\n";
- }
- // if news group, comment is main page
- if ($row['group_id'] != forge_get_config('news_group')) {
- print " <comments>http://".forge_get_config('web_host')."/forum/forum.php?forum_id=".$row['forum_id']."</comments>\n";
- } else {
- print " <comments>http://".forge_get_config('web_host')."/</comments>\n";
- }
+ print " <guid>$link</guid>\n";
+ print " <comments>$link</comments>\n";
print " </item>\n";
}
// ## end output