[Fusionforge-commits] FusionForge branch master updated. 42bdfe4854e95f8ad5806356064711490819c821

Franck VILLAUME nerville at fusionforge.org
Mon Feb 24 10:42:34 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  42bdfe4854e95f8ad5806356064711490819c821 (commit)
      from  ff4fffced50e07f93bb7dc6813449569d35ba330 (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 42bdfe4854e95f8ad5806356064711490819c821
Author: Franck Villaume <franck.villaume at trivialdev.com>
Date:   Mon Feb 24 10:41:27 2014 +0100

    use html_{e,ao,ac,ap} helpers, more beautify html output, use util_make_link

diff --git a/src/www/include/Layout.class.php b/src/www/include/Layout.class.php
index b2501b4..2b5833d 100644
--- a/src/www/include/Layout.class.php
+++ b/src/www/include/Layout.class.php
@@ -1293,8 +1293,8 @@ if (isset($params['group']) && $params['group']) {
 
 	function widget(&$widget, $layout_id, $readonly, $column_id, $is_minimized, $display_preferences, $owner_id, $owner_type) {
 		$element_id = 'widget_'. $widget->id .'-'. $widget->getInstanceId();
-		echo '<div class="widget" id="'. $element_id . "\">\n";
-		echo '<div class="widget_titlebar '. ($readonly?'':'widget_titlebar_handle') . "\">\n";
+		echo html_ao('div', array('class' => 'widget', 'id' => $element_id));
+		echo html_ao('div', array('class' => 'widget_titlebar '. ($readonly?'':'widget_titlebar_handle')));
 		echo html_e('div', array('class' => 'widget_titlebar_title'), $widget->getTitle(), false);
 		if (!$readonly) {
 			echo html_ao('div', array('class' => 'widget_titlebar_close'));
@@ -1320,23 +1320,23 @@ if (isset($params['group']) && $params['group']) {
 			echo util_make_link($widget->getRssUrl($owner_id, $owner_type), 'rss');
 			echo html_ac(html_ap() -1);
 		}
-		echo "</div>\n";
+		echo html_ac(html_ap() -1);
 		$style = '';
 		if ($is_minimized) {
 			$style = 'display:none;';
 		}
-		echo '<div class="widget_content" style="'. $style . "\">\n";
+		echo html_ao('div', array('class' => 'widget_content', 'style' => $style));
 		if (!$readonly && $display_preferences) {
 			echo '<div class="widget_preferences">'. $widget->getPreferencesForm($layout_id, $owner_id, $owner_type) . "</div>\n";
 		}
 		if ($widget->isAjax()) {
-			echo '<div id="'. $element_id .'-ajax">';
+			echo html_ao('div', array('id' => $element_id.'-ajax'));
 			echo '<noscript><iframe width="99%" frameborder="0" src="'. $widget->getIframeUrl($owner_id, $owner_type) .'"></iframe></noscript>';
-			echo "</div>\n";
+			echo html_ac(html_ap() -1);
 		} else {
 			echo $widget->getContent();
 		}
-		echo "</div>\n";
+		echo html_ac(html_ap() -1);
 		if ($widget->isAjax()) {
 			echo '<script type="text/javascript">/* <![CDATA[ */'."
 				jQuery(document).ready(function() {
@@ -1347,7 +1347,7 @@ if (isset($params['group']) && $params['group']) {
 						});
 			/* ]]> */</script>";
 		}
-		echo "</div>\n";
+		echo html_ac(html_ap() -1);
 	}
 
 	function _getTogglePlusForWidgets() {
diff --git a/src/www/include/trove.php b/src/www/include/trove.php
index 9bdb605..111d619 100644
--- a/src/www/include/trove.php
+++ b/src/www/include/trove.php
@@ -4,6 +4,7 @@
  *
  * Copyright 1999-2001 (c) VA Linux Systems
  * Copyright 2010-2011, Franck Villaume - Capgemini
+ * Copyright 2014, Franck Villaume - TrivialDev
  * http://fusionforge.org/
  *
  * This file is part of FusionForge. FusionForge is free software;
@@ -313,11 +314,9 @@ function trove_getcatlisting($group_id, $a_filter, $a_cats, $a_complete=0) {
 		if ($a_complete) {
 			for ($i=0;$i<$folders_len;$i++) {
 				if ($a_cats) {
-					$return .= '<a href="'.util_make_url ('/softwaremap/trove_list.php?cat=c&form_cat='.$folders_ids[$i].$discrim_url).'">';
-				}
-				$return .= ($folders[$i]);
-				if ($a_cats) {
-					$return .= '</a>';
+					$return .= util_make_link('/softwaremap/trove_list.php?cat=c&form_cat='.$folders_ids[$i].$discrim_url, $folders[$i]);
+				} else {
+					$return .= ($folders[$i]);
 				}
 				if ($i!=$folders_len-1) {
 					$return .= " : ";
@@ -325,11 +324,9 @@ function trove_getcatlisting($group_id, $a_filter, $a_cats, $a_complete=0) {
 			}
 		} else {
 			if ($a_cats) {
-				$return .= '<a href="'.util_make_url ('/softwaremap/trove_list.php?cat=c&form_cat='.$folders_ids[$folders_len-1].$discrim_url).'">';
-			}
-			$return .= ($folders[$folders_len-1]);
-			if ($a_cats) {
-				$return .= '</a>';
+				$return .= util_make_link('/softwaremap/trove_list.php?cat=c&form_cat='.$folders_ids[$folders_len-1].$discrim_url, $folders[$folders_len-1]);
+			} else {
+				$return .= ($folders[$folders_len-1]);
 			}
 			if ($i!=$folders_len-1) {
 				$return .= " : ";
@@ -340,13 +337,12 @@ function trove_getcatlisting($group_id, $a_filter, $a_cats, $a_complete=0) {
 			if ($filterisalreadyapplied) {
 				$return .= ' <strong>'._('(Now Filtering)').'</strong> ';
 			} else {
-				$return .= ' <a href="'.util_make_url ('/softwaremap/trove_list.php?cat=c&form_cat='.$form_cat);
 				if ($discrim_url) {
-					$return .= $discrim_url.','.$folders_ids[$folders_len-1];
+					$extraurlparam = $discrim_url.','.$folders_ids[$folders_len-1];
 				} else {
-					$return .= '&discrim='.$folders_ids[$folders_len-1];
+					$extraurlparam = '&discrim='.$folders_ids[$folders_len-1];
 				}
-				$return .= '">'._('[Filter]').'</a> ';
+				$return .= util_make_link('/softwaremap/trove_list.php?cat=c&form_cat='.$form_cat.$extraurlparam, _('[Filter]'));
 			}
 		}
 		$proj_discrim_used[$folders_ids[0]] = 1;
diff --git a/src/www/softwaremap/trove_list.php b/src/www/softwaremap/trove_list.php
index 6cb02f0..6326f73 100644
--- a/src/www/softwaremap/trove_list.php
+++ b/src/www/softwaremap/trove_list.php
@@ -5,7 +5,7 @@
  * Copyright 1999-2001, VA Linux Systems, Inc.
  * Copyright 2009, Roland Mas
  * Copyright 2011, Franck Villaume - Capgemini
- * Copyright 2013, Franck Villaume - TrivialDev
+ * Copyright 2013-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
@@ -193,9 +193,7 @@ if ( $cat === 'c' ) {
 	print "<ul>";
 	while ($row_sub = db_fetch_array($res_sub)) {
 		print "<li>";
-		print '<a href="trove_list.php?cat=c&form_cat=' . $row_sub['trove_cat_id'] . $discrim_url . '">';
-		print $row_sub['fullname'];
-		print '</a>';
+		echo util_make_link('/software/trove_list.php?cat=c&form_cat='.$row_sub['trove_cat_id'].$discrim_url, $row_sub['fullname']);
 		print ' <em>(';
 		print sprintf(_('%s projects'), $row_sub['subprojects']?$row_sub['subprojects']:'0');
 		print ')</em>';
diff --git a/src/www/themes/funky-wOw/Theme.class.php b/src/www/themes/funky-wOw/Theme.class.php
index c7cc77d..325c982 100644
--- a/src/www/themes/funky-wOw/Theme.class.php
+++ b/src/www/themes/funky-wOw/Theme.class.php
@@ -289,8 +289,7 @@ class Theme extends Layout {
 	 * @return	string	Html to start a submenu.
 	 */
 	function beginSubMenu() {
-		$return = html_eo('ul', array('class' => 'submenu'));
-		return $return;
+		return html_ao('ul', array('class' => 'submenu'));
 	}
 
 	/**
@@ -299,8 +298,7 @@ class Theme extends Layout {
 	 * @return	string	Html to end a submenu.
 	 */
 	function endSubMenu() {
-		$return = '</ul>'."\n";
-		return $return;
+		return html_ac(html_ap() - 1);
 	}
 
 	/**
diff --git a/src/www/themes/funky/Theme.class.php b/src/www/themes/funky/Theme.class.php
index 246430f..64f9c3c 100644
--- a/src/www/themes/funky/Theme.class.php
+++ b/src/www/themes/funky/Theme.class.php
@@ -289,8 +289,7 @@ class Theme extends Layout {
 	 * @return	string	Html to start a submenu.
 	 */
 	function beginSubMenu() {
-		$return = html_eo('ul', array('class' => 'submenu'));
-		return $return;
+		return html_ao('ul', array('class' => 'submenu'));
 	}
 
 	/**
@@ -299,8 +298,7 @@ class Theme extends Layout {
 	 * @return	string	Html to end a submenu.
 	 */
 	function endSubMenu() {
-		$return = '</ul>'."\n";
-		return $return;
+		return html_ac(html_ap() -1);
 	}
 
 	/**

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

Summary of changes:
 src/www/include/Layout.class.php         |   16 ++++++++--------
 src/www/include/trove.php                |   24 ++++++++++--------------
 src/www/softwaremap/trove_list.php       |    6 ++----
 src/www/themes/funky-wOw/Theme.class.php |    6 ++----
 src/www/themes/funky/Theme.class.php     |    6 ++----
 5 files changed, 24 insertions(+), 34 deletions(-)


hooks/post-receive
-- 
FusionForge



More information about the Fusionforge-commits mailing list