[evolvis-commits] r14190: Cleanup in project RSS feeds: Removed old 0.91 for clarity, fixed name of RSS feed

mirabilos at evolvis.org mirabilos at evolvis.org
Mon Feb 28 03:56:23 CET 2011


Author: mirabilos
Date: 2011-02-28 03:56:23 +0100 (Mon, 28 Feb 2011)
New Revision: 14190

Modified:
   trunk/gforge_base/evolvisforge-5.1/gforge/www/export/rss_project.php
Log:
Cleanup in project RSS feeds: Removed old 0.91 for clarity, fixed name of RSS feed

Modified: trunk/gforge_base/evolvisforge-5.1/gforge/www/export/rss_project.php
===================================================================
--- trunk/gforge_base/evolvisforge-5.1/gforge/www/export/rss_project.php	2011-02-28 02:56:21 UTC (rev 14189)
+++ trunk/gforge_base/evolvisforge-5.1/gforge/www/export/rss_project.php	2011-02-28 02:56:23 UTC (rev 14190)
@@ -1,16 +1,67 @@
 <?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
+ */
 
+/*
+ * 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."
+ */
+
 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();
+
 function get_rss_20_doc () {
-	return ' (<a href="http://blogs.law.harvard.edu/tech/rss">RSS 2.0</a>) ' . 
-		html_image('ic/rss.png',16,16,array('border'=>'0'));
+	return ' ' . html_image('ic/rss.png',16,16,array('border'=>'0'));
 }
 
 function get_rss_feed_20 ($page,$rss_title) {
@@ -21,113 +72,47 @@
 	return $rss_feed_20;
 }
 
-$project = &group_get_object(getIntFromRequest('group_id'));
+$HTML->header(array('title'=>_('RSS Exports')));
 
-$HTML->header(array('title'=>_("Project Exports")));
-
-echo '<h2>' . _('RSS/XML Exports') . '</h2><p>';
+echo '<h2>' . _('RSS Exports') . '</h2><p>';
  
-echo sprintf(_('%1$s data is exported in a variety of standard formats. Many of
+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.'),$GLOBALS['sys_name']);
 
-//echo '</p><h3>' . _('News Data') . '</h3><p>';
-
 echo _('To get Project News or New Project Releases of a specific project use the Links below.'); 
 
+$string_rss_20 = '';
 
-$string_rss_091 =  '<ul>';
-$string_rss_20 = '<ul>';
-
 // RSS for project news
 if ($project->usesNews() && $GLOBALS['sys_use_news']) {
-	// RSS 0.91 format
-	$string_rss_091 .= '<li><a href="rss_sfnews.php?group_id=' . getIntFromRequest('group_id') . '">' . 
-		$GLOBALS['sys_name'] . ' Developer Project News</a>';
-	$string_rss_091 .= '<link href="rss_sfnews.php?group_id=' . getIntFromRequest('group_id') . '" title="' . 
-		$GLOBALS[sys_name] . ' Developer Project News, RSS 0.91" rel="alternate" type="application/rss+xml" />';
-	/* these links are obsolete
-	$string_rss_091 .= '(<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>) ' . 
-		html_image('ic/rss.png',16,16,array('border'=>'0')) . '</li>';
-	*/
-	$string_rss_091 .= ' (RSS 0.91)';
-		
-	// RSS 2.0 format
-	$string_rss_20 .= get_rss_feed_20 ("rss20_news.php?group_id=" . getIntFromRequest('group_id'),
-										$GLOBALS['sys_name'] . _(" Developer Project 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']) ){
-	// RSS 2.0 format
-	$string_rss_20 .= get_rss_feed_20 ("rss20_activity.php?group_id=" . getIntFromRequest('group_id'),
-										$GLOBALS['sys_name'] . _(" Activity"));
+	$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']) {
-	// RSS 0.91 format
-	$string_rss_091 .= '<li><a href="rss_sfnewreleases.php?group_id=' . getIntFromRequest('group_id') . '">' . 
-		$GLOBALS['sys_name'] . ' Developer New Project Releases</a>';
-	$string_rss_091 .= '<link href="rss_sfnewreleases.php?group_id=' . getIntFromRequest('group_id') . 
-		'" title="' . $GLOBALS[sys_name] . ' Developer New Project Releases, RSS 0.91" rel="alternate" type="application/rss+xml" />';
-	/* these links are obsolete
-	$string_rss_091 .= '(<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>) ' . 
-		html_image('ic/rss.png',16,16,array('border'=>'0')) . '</li>';
-	*/
-	$string_rss_091 .= ' (RSS 0.91)';
-	
-	// RSS 2.0 format
-	$string_rss_20 .= get_rss_feed_20 ("rss20_newreleases.php?group_id=" . getIntFromRequest('group_id'),
-										$GLOBALS['sys_name'] . _(" Developer New Project Releases"));
+	$string_rss_20 .= get_rss_feed_20 ("rss20_newreleases.php?group_id=" . $group_id,
+										$name.': ' . _('Project Releases'));
 }
 
-/* Pages do not exists
-
-// RSS for project Bug Tracker
-if ($project->usesTracker() && $GLOBALS['sys_use_tracker']) {
-	// RSS 2.0 format
-	$string_rss_20 .= get_rss_feed_20 ("rss20_tracker.php?group_id=" . getIntFromRequest('group_id'),
-										$GLOBALS['sys_name'] . _(" Developer Bug Tracker"));
-}
-
-
-// RSS for project Documents
-if ($project->usesDocman() && $GLOBALS['sys_use_docman']) {
-	// RSS 2.0 format
-	$string_rss_20 .= get_rss_feed_20 ("rss20_docman.php?group_id=" . getIntFromRequest('group_id'),
-										$GLOBALS['sys_name'] . _(" Developer Documents"));
-}
-
-// RSS for project Forums Threads
-if ($project->usesForum() && $GLOBALS['sys_use_forum']) {
-	// RSS 2.0 format
-	$string_rss_20 .= get_rss_feed_20 ("rss20_forum.php?group_ids=" . getIntFromRequest('group_id'),
-										$GLOBALS['sys_name'] . _(" Developer forum Threads"));
-}
-
-*/
-
-$string_rss_091 .= '</ul>';
-$string_rss_20 .= '</ul>';
-
-echo $string_rss_091;
-echo $string_rss_20;
 ?>
-
-</p>
 <ul>
-<li><a href="http://wiki.evolvis.org/evolvis/index.php/RSS">Get more Feeds here.</a></li>
+<?php echo $string_rss_20; ?>
 </ul>
 
+</p>
 <a href="javascript:history.go(-1)">[<?php echo _('Go back') ?>]</a>
 <br />
 <?php $HTML->footer(array()); ?>



More information about the evolvis-commits mailing list