<?php
-//
-// SourceForge: Breaking Down the Barriers to Open Source Development
-// Copyright 1999-2000 (c) The SourceForge Crew
-// http://sourceforge.net
-//
+/*
+ * Copyright 1999-2000 (c) The SourceForge Crew
+ * Copyright (C) 2009 Alain Peyrat, Alcatel-Lucent
+ *
+ * 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.
+ *
+ * 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
+ */
-require "pre.php";
+/*
+ * Standard Alcatel-Lucent disclaimer for contributing to open source
+ *
+ * The code ("Contribution") has not been tested and/or
+ * validated for release as or in products, combinations with products or
+ * other commercial use. Any use of the Contribution is entirely made at
+ * the user's own responsibility and the user can not rely on any features,
+ * functionalities or performances Alcatel-Lucent has attributed to the
+ * Contribution.
+ *
+ * THE CONTRIBUTION BY ALCATEL-LUCENT IS PROVIDED AS IS, WITHOUT WARRANTY
+ * OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
+ * WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, COMPLIANCE,
+ * NON-INTERFERENCE AND/OR INTERWORKING WITH THE SOFTWARE TO WHICH THE
+ * CONTRIBUTION HAS BEEN MADE, TITLE AND NON-INFRINGEMENT. IN NO EVENT SHALL
+ * ALCATEL-LUCENT BE LIABLE FOR ANY DAMAGES OR OTHER LIABLITY, WHETHER IN
+ * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+ * CONTRIBUTION OR THE USE OR OTHER DEALINGS IN THE CONTRIBUTION, WHETHER
+ * TOGETHER WITH THE SOFTWARE TO WHICH THE CONTRIBUTION RELATES OR ON A STAND
+ * ALONE BASIS."
+ */
-$HTML->header(array(title=>"Project Exports"));
-?>
-<h2>RSS/XML Exports</h2>
+require_once '../env.inc.php';
+require_once $gfwww.'include/pre.php';
+
+$group_id = getIntFromRequest('group_id');
+
+/* We need a group_id */
+if (!$group_id) {
+ exit_no_group();
+}
+
+$project =& group_get_object($group_id);
+if (!$project|| !is_object($project) || $project->isError()) {
+ exit_no_group();
+}
+
+$name = $project->getPublicName();
-<p><?php print $GLOBALS[sys_default_name] ?> data is exported in a variety of standard formats. Many of
+function get_rss_20_doc () {
+ return ' ' . html_image('ic/rss.png',16,16,array('border'=>'0'));
+}
+
+function get_rss_feed_20 ($page,$rss_title) {
+ // RSS 2.0 format
+ $rss_feed_20 = '<li><a href="' . $page . '">' . $rss_title . '</a>';
+ $rss_feed_20 .= '<link href="' . $page . '" title="' . $rss_title . ', RSS 2.0" rel="alternate" type="application/rss+xml" />';
+ $rss_feed_20 .= get_rss_20_doc () . '</li>';
+ return $rss_feed_20;
+}
+
+$HTML->header(array('title'=>_('RSS Exports')));
+
+echo '<h2>' . _('RSS Exports') . '</h2><p>';
+
+printf(_('%1$s data is exported in RSS 2.0 format. Many of
the export URLs can also accept form/get data to customize the output. All
-data generated by these pages is realtime.
+data generated by these pages is realtime.'),$GLOBALS['sys_name']);
-<h3>News Data</h3>
-<p>
-To get Project News or New Project Releases of a specific project use the Links below.
-<ul>
-<li><a href="rss_sfnews.php?group_id=<?php echo getIntFromRequest(group_id); ?>"><?php print $GLOBALS[sys_name] ?> Developer Project News</a>
-(<a href="http://my.netscape.com/publish/formats/rss-spec-0.91.html">RSS 0.91</a>,
-<a href="http://my.netscape.com/publish/formats/rss-0.91.dtd"><rss-0.91.dtd></a>)</li>
-<li><a href="rss_sfnewreleases.php?group_id=<?php echo getIntFromRequest(group_id); ?>"><?php print $GLOBALS[sys_name] ?> Developer New Project Releases</a>
-(<a href="http://my.netscape.com/publish/formats/rss-spec-0.91.html">RSS 0.91</a>,
-<a href="http://my.netscape.com/publish/formats/rss-0.91.dtd"><rss-0.91.dtd></a>)</li>
-</ul>
+echo _('To get Project News or New Project Releases of a specific project use the Links below.');
+
+$string_rss_20 = '';
+
+// RSS for project news
+if ($project->usesNews() && $GLOBALS['sys_use_news']) {
+ $string_rss_20 .= get_rss_feed_20 ("rss20_news.php?group_id=" . $group_id,
+ $name.': ' . _('Project News'));
+}
+
+// RSS for project Activity
+if ( ($project->usesNews() && $GLOBALS['sys_use_news']) ||
+ ($project->usesFRS() && $GLOBALS['sys_use_frs']) ||
+ ($project->usesTracker() && $GLOBALS['sys_use_tracker']) ||
+ ($project->usesForum() && $GLOBALS['sys_use_forum']) ||
+ ($project->usesSCM() && $GLOBALS['sys_use_scm']) ){
+ $string_rss_20 .= get_rss_feed_20 ("rss20_activity.php?group_id=" . $group_id,
+ $name.': ' . _('Activity'));
+}
+// RSS for project Releases
+if ($project->usesFRS() && $GLOBALS['sys_use_frs']) {
+ $string_rss_20 .= get_rss_feed_20 ("rss20_newreleases.php?group_id=" . $group_id,
+ $name.': ' . _('Project Releases'));
+}
+
+?>
<ul>
-<li><a href="rss20_news.php?group_id=<?php echo getIntFromRequest(group_id); ?>"><?php print $GLOBALS[sys_name] ?> Developer Project News</a>
-(<a href="http://blogs.law.harvard.edu/tech/rss">RSS 2.0</a>)</li>
-<li><a href="rss20_newreleases.php?group_id=<?php echo getIntFromRequest(group_id); ?>"><?php print $GLOBALS[sys_name] ?> Developer New Project Releases</a>
-(<a href="http://blogs.law.harvard.edu/tech/rss">RSS 2.0</a>)</li>
+<?php echo $string_rss_20; ?>
</ul>
-<a HREF="javascript:history.go(-1)">[Go back]</a>
-<br>
-<?php
-$HTML->footer(array());
-?>
+</p>
+<a href="javascript:history.go(-1)">[<?php echo _('Go back') ?>]</a>
+<br />
+<?php $HTML->footer(array()); ?>