This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "FusionForge".

The branch, 6.0 has been updated
       via  4173e53df2e4d05e58720ce3cd6d39de5ae4f1ba (commit)
      from  ae25a101f98b05ea2ca146a4ddaf002f2bdfa980 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
https://scm.fusionforge.org/anonscm/gitweb/?p=fusionforge/fusionforge.git;a=commitdiff;h=4173e53df2e4d05e58720ce3cd6d39de5ae4f1ba

commit 4173e53df2e4d05e58720ce3cd6d39de5ae4f1ba
Author: Franck Villaume <[email protected]>
Date:   Sat Jan 30 18:16:04 2016 +0100

    rss docman: remove hardcoded http, use util_make_url & drop useless 
commented code

diff --git a/src/www/export/rss20_docman.php b/src/www/export/rss20_docman.php
index 3cbceb7..cc31e9a 100644
--- a/src/www/export/rss20_docman.php
+++ b/src/www/export/rss20_docman.php
@@ -1,6 +1,7 @@
 <?php
 /**
- * Copyright 2012, Franck Villaume - TrivialDev
+ * FusionForge Documents RSS Feed
+ * Copyright 2012,2015 Franck Villaume - TrivialDev
  * http://fusionforge.org/
  *
  * This file is part of FusionForge. FusionForge is free software;
@@ -19,16 +20,6 @@
  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
  */
 
-// export a group's tracker bugs per artifact in RSS 2.0
-// Author: Jutta Horstmann, data in transit <[email protected]>
-// Created: 01.10.07
-// Based on: export/rss20_tracker.php (by JH), docman/index.php
-// Changes:
-// Date         Author      Comment
-// 07.11.07     JH          show only public group feeds
-//
-//TO DO: Translations for error messages
-//Notes:
 // Keep in mind to write "&" in URLs as &amp; in RSS feeds
 
 
@@ -88,7 +79,7 @@ function beginFeed($groupname = "", $link = "") {
                        ';
        print " <channel>\n";
        print "  <title>".forge_get_config('forge_name')." Project 
\"".$groupname."\" Documents</title>\n";
-       print "  <link>http://".forge_get_config('web_host').$link."</link>\n";
+       print "  <link>".util_make_url($link)."</link>\n";
        print "  <description>".forge_get_config('forge_name')." Documents of 
\"".$groupname."\"</description>\n";
        print "  <language>en-us</language>\n";
        print "  <copyright>Copyright ".date("Y")." 
".forge_get_config('forge_name')."</copyright>\n";
@@ -100,10 +91,6 @@ function beginFeed($groupname = "", $link = "") {
 
 function writeFeed($d_arr, $limit){
 
-       // ## default limit
-       //if (isset($limit) ||empty($limit)) $limit = 10;
-       //if ($limit > 100) $limit = 100;
-
        /*
        if (!is_array($nested_groups["$parent_group"])) {
                return;
@@ -117,7 +104,7 @@ function writeFeed($d_arr, $limit){
                //$outputtotal = 0;
                //loop through the documents
                for ($j = 0; $j < count($d_arr); $j++) {
-                       $link = (( $d_arr[$j]->isURL() ) ? 
$d_arr[$j]->getFileName() : 
"http://".forge_get_config('web_host')."/docman/view.php/".$d_arr[$j]->Group->getID()."/".$d_arr[$j]->getID()."/".$d_arr[$j]->getFileName()
 );
+                       $link = (( $d_arr[$j]->isURL() ) ? 
$d_arr[$j]->getFileName() : 
util_make_url('/docman/view.php/'.$d_arr[$j]->Group->getID().'/'.$d_arr[$j]->getID().'/'.urlencode($d_arr[$j]->getFileName())));
 
                        print "  <item>\n";
                        if (!is_object($d_arr[$j])) {

-----------------------------------------------------------------------

Summary of changes:
 src/www/export/rss20_docman.php | 21 ++++-----------------
 1 file changed, 4 insertions(+), 17 deletions(-)


hooks/post-receive
-- 
FusionForge

_______________________________________________
Fusionforge-commits mailing list
[email protected]
http://lists.fusionforge.org/cgi-bin/mailman/listinfo/fusionforge-commits

Reply via email to