[Fusionforge-commits] FusionForge branch 6.1 updated. v6.1beta1-32-g9b027a3

Franck Villaume nerville at libremir.placard.fr.eu.org
Sun Dec 31 15:53:30 CET 2017


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.1 has been updated
       via  9b027a383b916494dafea4283d191b84ef56f1e1 (commit)
       via  a1c3535b10f866eb6480b386abcbec6c83141062 (commit)
       via  44afc1487220d4a9d2a4989351826a743200cf62 (commit)
      from  5668cb3e9958dd021dee2cb37684f5cb240f5399 (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=9b027a383b916494dafea4283d191b84ef56f1e1

commit 9b027a383b916494dafea4283d191b84ef56f1e1
Author: Franck Villaume <franck.villaume at trivialdev.com>
Date:   Sun Dec 31 15:53:01 2017 +0100

    rss tracker: general url fix

diff --git a/src/www/export/rss20_tracker.php b/src/www/export/rss20_tracker.php
index 7ab1ffc..aec5ae0 100644
--- a/src/www/export/rss20_tracker.php
+++ b/src/www/export/rss20_tracker.php
@@ -1,5 +1,7 @@
 <?php
 /**
+ * Previous Copyright: FusionForge Team
+ * Copyright 2017, Franck Villaume - TrivialDev
  * http://fusionforge.org/
  *
  * This file is part of FusionForge. FusionForge is free software;
@@ -34,7 +36,7 @@ require_once '../env.inc.php';
 require_once $gfcommon.'include/pre.php';
 require_once $gfwww.'export/rss_utils.inc';
 
-if (isset($_GET['group_id'])&&!empty($_GET['group_id'])&&is_numeric($_GET['group_id'])) {
+if (isset($_GET['group_id']) && !empty($_GET['group_id']) && is_numeric($_GET['group_id'])) {
 	$group_id = $_GET['group_id'];
 
 	$group = group_get_object($group_id);
@@ -50,10 +52,8 @@ if (isset($_GET['group_id'])&&!empty($_GET['group_id'])&&is_numeric($_GET['group
 		beginFeed();
 		endOnError('No RSS feed available as group status is set to private.');
 	}
-	$groupname = $group->getPublicName();
-	$link = "/tracker/?group_id=$group_id";
 
-        beginFeed($groupname,$link);
+        beginFeed($group->getPublicName(), '/tracker/?group_id='.$group_id);
 
 	//does tracker exist? do we get a factory?
 	$atf = new ArtifactTypeFactory($group);
@@ -69,8 +69,7 @@ if (isset($_GET['group_id'])&&!empty($_GET['group_id'])&&is_numeric($_GET['group
 }//no group_id in GET
 else {
 	beginFeed();
-	displayError('Please supply a Group ID with the request.');
-	endFeed();
+	endOnError('Please supply a Group ID with the request.');
 }
 
 //**************************************************************++
@@ -82,17 +81,17 @@ function beginFeed($groupname = "", $link = "") {
 			';
 	print " <channel>\n";
 	print "  <title>".forge_get_config('forge_name')." Project \"".$groupname."\" Bug Trackers</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')." Bug Trackers of \"".$groupname."\"</description>\n";
 	print "  <language>en-us</language>\n";
 	print "  <copyright>Copyright 2000-".date("Y")." ".forge_get_config('forge_name')."</copyright>\n";
 	print "  <webMaster>".forge_get_config('admin_email')."</webMaster>\n";
-	print "  <lastBuildDate>".gmdate('D, d M Y G:i:s',time())." GMT</lastBuildDate>\n";
+	print "  <lastBuildDate>".rss_date(time())."</lastBuildDate>\n";
 	print "  <docs>http://blogs.law.harvard.edu/tech/rss</docs>\n";
 	print "  <image>\n";
-	print "    <url>http://".forge_get_config('web_host')."/images/bflogo-88.png</url>\n";
-	print "    <title>".forge_get_config('forge_name')." Developer</title>\n";
-	print "    <link>http://".forge_get_config('web_host')."/</link>\n";
+	print "    <url>".util_make_url('/images/icon.png')."</url>\n";
+	print "    <title>".forge_get_config('forge_name')."</title>\n";
+	print "    <link>".util_make_url()."</link>\n";
 	print "    <width>124</width>\n";
 	print "    <heigth>32</heigth>\n";
 	print "  </image>\n";
@@ -118,11 +117,11 @@ function writeFeed($at_arr, $group_id){
 			if (!is_object($at_arr[$j])) {
                         	//just skip it
 			} elseif ($at_arr[$j]->isError()) {
-				print " <title>Error</title>".
+				print " <title>"._('Error')."</title>".
 						"<description>".rss_description($at_arr[$j]->getErrorMessage())."</decription>";
 			} else {
 				print "   <title>".$at_arr[$j]->getName()."</title>\n";
-				print "   <link>http://".forge_get_config('web_host')."/tracker?atid=".$at_arr[$j]->getID()."&group_id=".$group_id."&func=browse</link>\n";
+				print "   <link>".util_make_url("/tracker?atid=".$at_arr[$j]->getID()."&group_id=".$group_id."&func=browse")."</link>\n";
 				print "   <description>".
 						rss_description($at_arr[$j]->getDescription()).
 						" - Open Bugs: ".(int) $at_arr[$j]->getOpenCount() .

https://scm.fusionforge.org/anonscm/gitweb/?p=fusionforge/fusionforge.git;a=commitdiff;h=a1c3535b10f866eb6480b386abcbec6c83141062

commit a1c3535b10f866eb6480b386abcbec6c83141062
Author: Franck Villaume <franck.villaume at trivialdev.com>
Date:   Sun Dec 31 15:52:13 2017 +0100

    rss utils: use util_make_url when needed

diff --git a/src/www/export/rss_utils.inc b/src/www/export/rss_utils.inc
index 09de6c6..1d50cbd 100644
--- a/src/www/export/rss_utils.inc
+++ b/src/www/export/rss_utils.inc
@@ -52,14 +52,14 @@ function rss_description ($in) {
 
 // callback is optional function name which should be called for each project
 // row and which result will be appended to description element
-function rss_dump_project_result_set ($res,$title,$desription='',$callback=0) {
-        if (!$desription) $desription=$title;
+function rss_dump_project_result_set($res, $title ,$desription = '', $callback = 0) {
+        if (!$desription) $desription = $title;
 	// one time output
 	print " <channel>\n";
-	print "  <copyright>Copyright ".date("Y")." ".forge_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://".forge_get_config ('web_host')."/</link>\n";
+	print "  <link>".util_make_url()."</link>\n";
 	print "  <title>$title</title>\n";
 	print "  <webMaster>".forge_get_config ('admin_email')."</webMaster>\n";
 	print "  <language>en-us</language>\n";
@@ -93,7 +93,7 @@ function rss_dump_project_result_array ($result,$title,$desription='',$callback=
 	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://".forge_get_config ('web_host')."/</link>\n";
+	print "  <link>".util_make_url()."</link>\n";
 	print "  <title>$title</title>\n";
 	print "  <webMaster>".forge_get_config ('admin_email')."</webMaster>\n";
 	print "  <language>en-us</language>\n";

https://scm.fusionforge.org/anonscm/gitweb/?p=fusionforge/fusionforge.git;a=commitdiff;h=44afc1487220d4a9d2a4989351826a743200cf62

commit 44afc1487220d4a9d2a4989351826a743200cf62
Author: Franck Villaume <franck.villaume at trivialdev.com>
Date:   Sun Dec 31 15:51:26 2017 +0100

    remove useless code

diff --git a/src/www/include/html.php b/src/www/include/html.php
index 84ba721..74fab25 100644
--- a/src/www/include/html.php
+++ b/src/www/include/html.php
@@ -158,10 +158,6 @@ function html_abs_image($url, $width, $height, $args) {
  */
 function html_image($src, $width = 0, $height = 0, $args = array(), $display = true) {
 	global $HTML;
-
-	if (method_exists($HTML, 'html_image')) {
-		$HTML->html_image($src, $width, $height, $args);
-	}
 	$s = ((session_issecure()) ? forge_get_config('images_secure_url') : forge_get_config('images_url'));
 	return html_abs_image($s.$HTML->imgbaseurl.$src, $width, $height, $args);
 }

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

Summary of changes:
 src/www/export/rss20_tracker.php | 25 ++++++++++++-------------
 src/www/export/rss_utils.inc     | 10 +++++-----
 src/www/include/html.php         |  4 ----
 3 files changed, 17 insertions(+), 22 deletions(-)


hooks/post-receive
-- 
FusionForge



More information about the Fusionforge-commits mailing list