[Fusionforge-commits] FusionForge branch master updated. 7b4f41587075d19e4260f594824174808b7e7939

Franck VILLAUME nerville at fusionforge.org
Fri Feb 21 10:45:35 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  7b4f41587075d19e4260f594824174808b7e7939 (commit)
       via  818e551e33d41558781ab6da5efd36fef4dfd74e (commit)
      from  53940a599f945475b55133a0d083a3fb3e874611 (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 7b4f41587075d19e4260f594824174808b7e7939
Author: Franck Villaume <franck.villaume at trivialdev.com>
Date:   Fri Feb 21 10:45:17 2014 +0100

    html_e & html_eo beautifier

diff --git a/src/www/include/html.php b/src/www/include/html.php
index d86d37e..72f2709 100644
--- a/src/www/include/html.php
+++ b/src/www/include/html.php
@@ -1103,11 +1103,15 @@ function relative_date($date) {
  *		XHTML string suitable for echo'ing
  */
 function html_eo($name, $attrs = array()) {
-	global $use_tooltips;
+	global $use_tooltips, $html_autoclose_pos;
 	if (!$use_tooltips && isset($attrs['title']) && isset($attrs['class']) && preg_match('/tabtitle/', $attrs['class'])) {
 		$attrs['title'] = '';
 	}
-	$rv = '<'.$name;
+	$rv = '';
+	for ($i = 0; $i < $html_autoclose_pos; $i++) {
+		$rv .= "\t";
+	}
+	$rv .= '<'.$name;
 	foreach ($attrs as $key => $value) {
 		if (is_array($value)) {
 			$value = count($value) ? implode(" ", $value) : false;
@@ -1139,11 +1143,18 @@ function html_eo($name, $attrs = array()) {
  *		XHTML string suitable for echo'ing
  */
 function html_e($name, $attrs = array(), $content = "", $shortform = true) {
-	global $use_tooltips;
+	global $use_tooltips, $html_autoclose_pos;
 	if (!$use_tooltips && isset($attrs['title']) && isset($attrs['class']) && preg_match('/tabtitle/', $attrs['class'])) {
 		$attrs['title'] = '';
 	}
-	$rv = '<'.$name;
+	$rv = '';
+	for ($i = 0; $i < $html_autoclose_pos; $i++) {
+		$rv .= "\t";
+	}
+	if (!$shortform) {
+		$rv .= "\t";
+	}
+	$rv .= '<'.$name;
 	foreach ($attrs as $key => $value) {
 		if (is_array($value)) {
 			$value = count($value) ? implode(" ", $value) : false;
@@ -1245,6 +1256,9 @@ function html_ac($spos) {
 
 	$rv = "";
 	while ($html_autoclose_pos > $spos) {
+		for ($i = 0; $i < $html_autoclose_pos; $i++) {
+			$rv .= "\t";
+		}
 		--$html_autoclose_pos;
 		$rv .= '</'.$html_autoclose_stack[$html_autoclose_pos]['name'].'>'."\n";
 		unset($html_autoclose_stack[$html_autoclose_pos]);

commit 818e551e33d41558781ab6da5efd36fef4dfd74e
Author: Franck Villaume <franck.villaume at trivialdev.com>
Date:   Fri Feb 21 10:44:27 2014 +0100

    utils_requiredField use html_e

diff --git a/src/common/include/utils.php b/src/common/include/utils.php
index 9ea9074..fb722ad 100644
--- a/src/common/include/utils.php
+++ b/src/common/include/utils.php
@@ -542,7 +542,7 @@ function utils_buildcheckboxarray($options, $name, $checked_array) {
  * @return	string	A string holding the HTML to mark a required field
  */
 function utils_requiredField() {
-	return '<span class="requiredfield">*</span>';
+	return html_e('span', array('class' => 'requiredfield'), '*');
 }
 
 /**

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

Summary of changes:
 src/common/include/utils.php |    2 +-
 src/www/include/html.php     |   22 ++++++++++++++++++----
 2 files changed, 19 insertions(+), 5 deletions(-)


hooks/post-receive
-- 
FusionForge



More information about the Fusionforge-commits mailing list