[Fusionforge-commits] FusionForge branch master updated. 1a38a81f560a81cb444650dac4d540867ae5b9f1

Franck Villaume nerville at fusionforge.org
Thu Dec 25 15:14:44 CET 2014


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, master has been updated
       via  1a38a81f560a81cb444650dac4d540867ae5b9f1 (commit)
       via  bb3ff5d42cbcf4efc1f570394df83981e33cb2f8 (commit)
       via  9baebea861abd3f79494f3bb82351f04e834106e (commit)
       via  c06a6e8d8878d118ccabc356c53422b75ea1f7cd (commit)
      from  1791c451e1fc1bed16ac05394a4eaba937396d9b (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 -----------------------------------------------------------------
commit 1a38a81f560a81cb444650dac4d540867ae5b9f1
Author: Franck Villaume <franck.villaume at trivialdev.com>
Date:   Thu Dec 25 15:13:56 2014 +0100

    frs: fix loop on getFiles

diff --git a/src/common/frs/FRSRelease.class.php b/src/common/frs/FRSRelease.class.php
index 349abb8..4cf52d1 100644
--- a/src/common/frs/FRSRelease.class.php
+++ b/src/common/frs/FRSRelease.class.php
@@ -372,11 +372,13 @@ class FRSRelease extends Error {
 			return false;
 		}
 		$f =& $this->getFiles();
-		for ($i = 0; $i < count($f); $i++) {
-			if (!is_object($f[$i]) || $f[$i]->isError() || !$f[$i]->delete()) {
-				$this->setError(_('File Error')._(': ').$f[$i]->getName()._(': ').$f[$i]->getErrorMessage());
+
+		while($file = current($f)) {
+			if (!is_object($file) || $file->isError() || !$file->delete()) {
+				$this->setError(_('File Error')._(': ').$file->getName()._(': ').$file->getErrorMessage());
 				return false;
 			}
+			next($f);
 		}
 		$dir=forge_get_config('upload_dir').'/'.
 			$this->FRSPackage->Group->getUnixName() . '/' .

commit bb3ff5d42cbcf4efc1f570394df83981e33cb2f8
Author: Franck Villaume <franck.villaume at trivialdev.com>
Date:   Wed Dec 24 14:47:02 2014 +0100

    use HTML helpers

diff --git a/src/www/softwaremap/full_list.php b/src/www/softwaremap/full_list.php
index ba6cb85..e0986d5 100644
--- a/src/www/softwaremap/full_list.php
+++ b/src/www/softwaremap/full_list.php
@@ -2,7 +2,7 @@
 /**
  * Copyright (C) 2008-2009 Alcatel-Lucent
  * Copyright (C) 2010 Alain Peyrat - Alcatel-Lucent
- * Copyright 2012, Franck Villaume - TrivialDev
+ * Copyright 2012,2014 Franck Villaume - TrivialDev
  *
  * This file is part of FusionForge. FusionForge is free software;
  * you can redistribute it and/or modify it under the terms of the
@@ -50,6 +50,8 @@ if (!forge_get_config('use_project_full_list')) {
 	exit_disabled();
 }
 
+glboal $HTML;
+
 $HTML->header(array('title'=>_('Project List'),'pagename'=>'softwaremap'));
 $HTML->printSoftwareMapLinks();
 
@@ -76,7 +78,7 @@ if ($querytotalcount > $TROVE_BROWSELIMIT) {
 	$html_limit .= html_trove_limit_navigation_box($_SERVER['PHP_SELF'], $querytotalcount, $TROVE_BROWSELIMIT, $page);
 }
 
-print $html_limit."<hr />\n";
+echo $html_limit.html_e('hr');
 
 // #################################################################
 // print actual project listings
@@ -94,42 +96,43 @@ for ($i_proj=0;$i_proj<$querytotalcount;$i_proj++) {
 
 		// Embed RDFa description for /projects/PROJ_NAME
 		$proj_uri = util_make_url_g(strtolower($row_grp['unix_group_name']),$row_grp['group_id']);
-		print '<div typeof="doap:Project sioc:Space" about="'.$proj_uri.'">'."\n";
-		print '<span rel="planetforge:hosted_by" resource="'. util_make_url ('/') .'"></span>'."\n";
+		echo html_ao('div', array('typeof' => 'doap:Project sioc:Space', 'about' => $proj_uri));
+		echo html_e('span', array('rel' => 'planetforge:hosted_by', 'resource' => util_make_url('/')), '', false);
 
-		print '<table class="fullwidth">';
-		print '<tr class="top"><td colspan="2">';
-		print util_make_link_g(strtolower($row_grp['unix_group_name']),$row_grp['group_id'],'<strong>'
+		echo $HTML->listTableTop();
+		$cells = array();
+		$content = util_make_link_g(strtolower($row_grp['unix_group_name']),$row_grp['group_id'],'<strong>'
 			.'<span property="doap:name">'
 			.$row_grp['group_name']
 			.'</span>'
 			.'</strong>').' ';
-
 		if ($row_grp['short_description']) {
-			print "- "
+			$content .= '- '
 			. '<span property="doap:short_desc">'
 			. $row_grp['short_description']
 			. '</span>';
 		}
-
-		// extra description
-		print '</td></tr><tr class="top"><td>';
+		$cells[] = array($content, 'colspan' => 2);
+		echo $HTML->multiTableRow(array('class' => 'top'), $cells);
+		$cells = array();
+		$content = '';
 		// list all trove categories
 		if (forge_get_config('use_trove')) {
-			print trove_getcatlisting($row_grp['group_id'],0,1,1);
+			$content .= trove_getcatlisting($row_grp['group_id'], 0, 1, 1);
 		}
-		print '</td>';
-		print '<td class="bottom align-right"><br />'._('Register Date:').' <strong>'.date(_('Y-m-d H:i'),$row_grp['register_time']).'</strong></td>';
-		print '</tr>';
-		print '</table>';
-        print '</div>'; // /doap:Project
-		print '<hr />';
+		$cells[] = array($content, 'class' => 'top');
+		$cells[] = array(html_e('br')._('Register Date')._(': ').html_e('strong', array(), date(_('Y-m-d H:i'),$row_grp['register_time'])),
+				'class' => 'bottom align-right');
+		echo $HTML->multiTableRow(array('class' => 'top'), $cells);
+		echo $HTML->listTableBottom();
+		echo html_ac(html_ap() -1);
+		echo html_e('hr');
 	} // end if for row and range chacking
 }
 
 // print bottom navigation if there are more projects to display
 if ($querytotalcount > $TROVE_BROWSELIMIT) {
-	print $html_limit;
+	echo $html_limit;
 }
 
 $HTML->footer();

commit 9baebea861abd3f79494f3bb82351f04e834106e
Author: Franck Villaume <franck.villaume at trivialdev.com>
Date:   Wed Dec 24 14:45:55 2014 +0100

    use HTML helpers

diff --git a/src/www/include/tool_reports.php b/src/www/include/tool_reports.php
index 6f8485b..91b830e 100644
--- a/src/www/include/tool_reports.php
+++ b/src/www/include/tool_reports.php
@@ -55,7 +55,7 @@ function reports_quick_graph($title, $qpa1, $qpa2) {
 		$values[] = $diff;
 		report_pm_hbar(1, $values, $titles, $labels, $all);
 	} else {
-		echo "<p class='information'>"._('No data found to report')."</p>";
+		echo $HTML->information(_('No data found to report'));
 	}
 }
 

commit c06a6e8d8878d118ccabc356c53422b75ea1f7cd
Author: Franck Villaume <franck.villaume at trivialdev.com>
Date:   Wed Dec 24 13:40:26 2014 +0100

    less code in html_trove_limit_navigation_box function

diff --git a/src/www/include/html.php b/src/www/include/html.php
index 2f26ea1..67e3e08 100644
--- a/src/www/include/html.php
+++ b/src/www/include/html.php
@@ -1322,17 +1322,14 @@ function html_trove_limit_navigation_box($php_self, $querytotalcount, $trove_bro
 	$html_limit = sprintf(_(' Displaying %1$s per page. Projects sorted by alphabetical order.'), $trove_browselimit).'<br/>';
 
 	// display all the numbers
-	for ($i=1;$i<=ceil($querytotalcount/$trove_browselimit);$i++) {
+	for ($i = 1; $i <= ceil($querytotalcount/$trove_browselimit); $i++) {
 		$html_limit .= ' ';
-		if ($page != $i) {
-			$html_limit .= '<a href="'.$php_self;
-			$html_limit .= '?page='.$i;
-			$html_limit .= '">';
-		} else $html_limit .= '<strong>';
-		$html_limit .= '<'.$i.'>';
-		if ($page != $i) {
-			$html_limit .= '</a>';
-		} else $html_limit .= '</strong>';
+		$ahrefcontent = '<'.$i.'>';
+		if ($page == $i) {
+			$html_limit .= html_e('strong', array(), $ahrefcontent);
+		} else {
+			$html_limit .= util_make_link($php_self.'?page='.$i, $ahrefcontent);
+		}
 		$html_limit .= ' ';
 	}
 	return $html_limit;

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

Summary of changes:
 src/common/frs/FRSRelease.class.php |    8 ++++---
 src/www/include/html.php            |   17 ++++++--------
 src/www/include/tool_reports.php    |    2 +-
 src/www/softwaremap/full_list.php   |   43 +++++++++++++++++++----------------
 4 files changed, 36 insertions(+), 34 deletions(-)


hooks/post-receive
-- 
FusionForge



More information about the Fusionforge-commits mailing list