[Fusionforge-commits] FusionForge branch master updated. 6.0.4-829-g00dd6bc

Franck Villaume nerville at libremir.placard.fr.eu.org
Sat Sep 3 11:03:51 CEST 2016


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  00dd6bc5329618392b227b3942d52a83bd383eac (commit)
      from  4d490655017fcd4094bba6f42866d41a3b2c9629 (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=00dd6bc5329618392b227b3942d52a83bd383eac

commit 00dd6bc5329618392b227b3942d52a83bd383eac
Author: Franck Villaume <franck.villaume at trivialdev.com>
Date:   Sat Sep 3 11:03:20 2016 +0200

    use HTML helpers openForm & closeForm, add missing licence

diff --git a/src/common/forum/ForumHTML.class.php b/src/common/forum/ForumHTML.class.php
index 1f2b67c..43de330 100644
--- a/src/common/forum/ForumHTML.class.php
+++ b/src/common/forum/ForumHTML.class.php
@@ -6,8 +6,8 @@
  * Copyright 2002, Tim Perdue - GForge, LLC
  * Copyright 2010 (c) Franck Villaume - Capgemini
  * Copyright (C) 2010-2012 Alain Peyrat - Alcatel-Lucent
- * Copyright 2013-2015, Franck Villaume - TrivialDev
  * Copyright 2013, French Ministry of National Education
+ * Copyright 2013-2016, Franck Villaume - TrivialDev
  * http://fusionforge.org
  *
  * This file is part of FusionForge. FusionForge is free software;
@@ -472,6 +472,7 @@ class ForumHTML extends FFError {
 	 * @return	The HTML output echoed
 	 */
 	function showEditForm(&$msg) {
+		global $HTML;
 		$thread_id = $msg->getThreadID();
 		$msg_id = $msg->getID();
 		$posted_by = $msg->getPosterID();
@@ -488,8 +489,8 @@ class ForumHTML extends FFError {
 			echo notepad_func();
 			?>
 			<div style="margin-left: auto; margin-right: auto;">
-			<form id="ForumEditForm" enctype="multipart/form-data" action="<?php echo util_make_url ('/forum/admin/index.php') ?>" method="post">
-			<?php $objid = $this->Forum->getID();?>
+			<?php echo $HTML->openForm(array('id' => 'ForumEditForm', 'enctype' => 'multipart/form-data', 'action' => '/forum/admin/index.php', 'method' => 'post'));
+			$objid = $this->Forum->getID(); ?>
 			<input type="hidden" name="thread_id" value="<?php echo $thread_id; ?>" />
 			<input type="hidden" name="forum_id" value="<?php echo $objid; ?>" />
 			<input type="hidden" name="editmsg" value="<?php echo $msg_id; ?>" />
@@ -532,7 +533,7 @@ class ForumHTML extends FFError {
 				<input type="submit" name="cancel" formnovalidate="formnovalidate" value="<?php echo _('Cancel'); ?>" />
 				</p>
 			</td></tr></table></fieldset>
-			</form>
+			<?php echo $HTML->closeForm(); ?>
 			</div>
 			<?php
 		}
@@ -544,7 +545,7 @@ class ForumHTML extends FFError {
 	 * @param string $subject
 	 */
 	function showPostForm($thread_id=0, $is_followup_to=0, $subject="") {
-		global $group_id;
+		global $group_id, $HTML;
 
 		$body = '';
 
@@ -557,7 +558,7 @@ class ForumHTML extends FFError {
 			echo notepad_func();
 			?>
 			<div class="align-center">
-			<form id="ForumPostForm" enctype="multipart/form-data" action="<?php echo util_make_url ('/forum/forum.php?forum_id='.$this->Forum->getID().'&group_id='.$group_id); ?>" method="post">
+			<?php echo $HTML->openForm(array('id' => 'ForumPostForm', 'enctype' => 'multipart/form-data', 'action' => '/forum/forum.php?forum_id='.$this->Forum->getID().'&group_id='.$group_id, 'method' => 'post')); ?>
 			<input type="hidden" name="post_message" value="y" />
 			<input type="hidden" name="thread_id" value="<?php echo $thread_id; ?>" />
 			<input type="hidden" name="msg_id" value="<?php echo $is_followup_to; ?>" />
@@ -607,7 +608,7 @@ class ForumHTML extends FFError {
 	</tr>
 </table>
 </fieldset>
-</form>
+<?php echo $HTML->closeForm(); ?>
 </div>
 			<?php
 
diff --git a/src/plugins/authcas/common/AuthCASPlugin.class.php b/src/plugins/authcas/common/AuthCASPlugin.class.php
index c30d32b..8d03e47 100644
--- a/src/plugins/authcas/common/AuthCASPlugin.class.php
+++ b/src/plugins/authcas/common/AuthCASPlugin.class.php
@@ -86,22 +86,17 @@ server.");
 
 		$this->initCAS();
 
-		$result = '';
+		$result = html_e('p', array(), _('Cookies must be enabled past this point.'));
 
-		$result .= '<p>';
-		$result .= _('Cookies must be enabled past this point.');
-		$result .= '</p>';
-
-		$result .= '<form action="' . util_make_url('/plugins/authcas/post-login.php') . '" method="get">
-<input type="hidden" name="form_key" value="' . form_generate_key() . '"/>
+		$result .= $HTML->openForm(array('action' => '/plugins/'.$this->name.'/post-login.php', 'method' => 'get'));
+		$result .= '<input type="hidden" name="form_key" value="' . form_generate_key() . '"/>
 <input type="hidden" name="return_to" value="' . htmlspecialchars(stripslashes($return_to)) . '" />
 <p><input type="submit" name="login" value="' . _('Login via CAS') . '" />
-</p>
-</form>';
-
+</p>';
+		$result .= $HTML->closeForm();
 		$params['html_snippets'][$this->name] = $result;
 
-		$params['transparent_redirect_urls'][$this->name] = util_make_url('/plugins/authcas/post-login.php?return_to='.htmlspecialchars(stripslashes($return_to)).'&login=1');
+		$params['transparent_redirect_urls'][$this->name] = util_make_url('/plugins/'.$this->name.'/post-login.php?return_to='.htmlspecialchars(stripslashes($return_to)).'&login=1');
 	}
 
     /**
diff --git a/src/plugins/authhttpd/common/AuthHTTPDPlugin.class.php b/src/plugins/authhttpd/common/AuthHTTPDPlugin.class.php
index a57dcb6..b583739 100644
--- a/src/plugins/authhttpd/common/AuthHTTPDPlugin.class.php
+++ b/src/plugins/authhttpd/common/AuthHTTPDPlugin.class.php
@@ -1,6 +1,8 @@
 <?php
-/** External authentication via HTTPD for FusionForge
+/**
+ * External authentication via HTTPD for FusionForge
  * Copyright 2011, Roland Mas
+ * Copyright 2016, 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
@@ -54,27 +56,23 @@ FusionForge, for instance where Kerberos is used.");
 	 * @return boolean
 	 */
 	function displayAuthForm(&$params) {
+		global $HTML;
 		if (!$this->isRequired() && !$this->isSufficient()) {
 			return true;
 		}
 		$return_to = $params['return_to'];
 
-		$result = '';
-
-		$result .= '<p>';
-		$result .= _('Cookies must be enabled past this point.');
-		$result .= '</p>';
+		$result = html_e('p', array(), _('Cookies must be enabled past this point.'));
 
-		$result .= '<form action="' . util_make_url('/plugins/authhttpd/post-login.php') . '" method="get">
-<input type="hidden" name="form_key" value="' . form_generate_key() . '"/>
+		$result .= $HTML->openForm(array('action' => '/plugins/'.$this->name.'/post-login.php', 'method' => 'get'));
+		$result .= '<input type="hidden" name="form_key" value="' . form_generate_key() . '"/>
 <input type="hidden" name="return_to" value="' . htmlspecialchars(stripslashes($return_to)) . '" />
 <p><input type="submit" name="login" value="' . _('Login via HTTP authentication') . '" />
-</p>
-</form>';
-
+</p>';
+		$result .= $HTML->closeForm();
 		$params['html_snippets'][$this->name] = $result;
 
-		$params['transparent_redirect_urls'][$this->name] = util_make_url('/plugins/authhttpd/post-login.php?return_to='.htmlspecialchars(stripslashes($return_to)));
+		$params['transparent_redirect_urls'][$this->name] = util_make_url('/plugins/'.$this->name.'/post-login.php?return_to='.htmlspecialchars(stripslashes($return_to)));
 	}
 
 	/**
diff --git a/src/plugins/authopenid/include/AuthOpenIDPlugin.class.php b/src/plugins/authopenid/include/AuthOpenIDPlugin.class.php
index c80e2ce..132071f 100644
--- a/src/plugins/authopenid/include/AuthOpenIDPlugin.class.php
+++ b/src/plugins/authopenid/include/AuthOpenIDPlugin.class.php
@@ -1,7 +1,9 @@
 <?php
-/** External authentication via OpenID for FusionForge
+/**
+ * External authentication via OpenID for FusionForge
  * Copyright 2011, Roland Mas
  * Copyright 2011, Olivier Berger & Institut Telecom
+ * Copyright 2016, Franck Villaume - TrivialDev
  *
  * This program was developped in the frame of the COCLICO project
  * (http://www.coclico-project.org/) with financial support of the Paris
@@ -72,18 +74,15 @@ class AuthOpenIDPlugin extends ForgeAuthPlugin {
 		}
 		$return_to = $params['return_to'];
 
-		$result = '';
 
-		$result .= '<p>';
-		$result .= _('Cookies must be enabled past this point.');
-		$result .= '</p>';
+		$result = html_e('p', array(), _('Cookies must be enabled past this point.'));
 
-		$result .= '<form action="' . util_make_url('/plugins/authopenid/post-login.php') . '" method="post">
-<input type="hidden" name="form_key" value="' . form_generate_key() . '"/>
+		$result .= $HTML->openForm(array('action' => '/plugins/'.$this->name.'/post-login.php', 'method' => 'get'));
+		$result .= '<input type="hidden" name="form_key" value="' . form_generate_key() . '"/>
 <input type="hidden" name="return_to" value="' . htmlspecialchars(stripslashes($return_to)) . '" />
 Your OpenID identifier: <input type="text" name="openid_identifier" />
-<input type="submit" name="login" value="' . _('Login via OpenID') . '" />
-</form>';
+<input type="submit" name="login" value="' . _('Login via OpenID') . '" />';
+		$result .= $HTML->closeForm();
 
 		$params['html_snippets'][$this->name] = $result;
 
@@ -175,7 +174,7 @@ Your OpenID identifier: <input type="text" name="openid_identifier" />
 		$text = $this->text; // this is what shows in the tab
 		if ($G_SESSION->usesPlugin($this->name)) {
 			//$param = '?type=user&id=' . $G_SESSION->getId() . "&pluginname=" . $this->name; // we indicate the part we're calling is the user one
-			echo $HTML->PrintSubMenu (array ($text), array ('/plugins/authopenid/index.php'), array(_('coin pan')));
+			echo $HTML->PrintSubMenu (array ($text), array ('/plugins/'.$this->name.'/index.php'), array(_('coin pan')));
 		}
 	}
 }
diff --git a/src/plugins/contribtracker/www/global_admin.php b/src/plugins/contribtracker/www/global_admin.php
index 133f0d4..0f184d7 100644
--- a/src/plugins/contribtracker/www/global_admin.php
+++ b/src/plugins/contribtracker/www/global_admin.php
@@ -1,10 +1,9 @@
 <?php
-
 /**
  * ContribTracker plugin
  *
  * Copyright 2009, Roland Mas
- * Copyright 2010 (c) Franck Villaume
+ * Copyright 2010, 2016, Franck Villaume - TrivialDev
  * http://fusionforge.org/
  *
  * This file is part of FusionForge.
@@ -262,19 +261,19 @@ case 'display':
 			print '<td>'.htmlspecialchars($a->getLegalStructure()->getName()).'</td>' ;
 			?>
 				<td>
-					 <form action="<?php echo util_make_url ('/plugins/'.$plugin->name.'/global_admin.php') ?>" method="post">
-					 <input type="hidden" name="action" value="edit_actor" />
-					 <input type="hidden" name="actor_id" value="<?php echo $a->getId () ?>" />
-					 <input type="submit" name="submit" value="<?php echo _('Edit') ?>" />
-					 </form>
-					 <form action="<?php echo util_make_url ('/plugins/'.$plugin->name.'/global_admin.php') ?>" method="post">
-					 <input type="hidden" name="action" value="del_actor" />
-					 <input type="hidden" name="actor_id" value="<?php echo $a->getId () ?>" />
-					 <input type="submit" name="submit" value="<?php echo _('Delete') ?>" />
-					 </form>
-					 </td>
-					 <?php
-					 print '</tr>';
+					<?php echo $HTML->openForm(array('action' => '/plugins/'.$plugin->name.'/global_admin.php', 'method' => 'post')); ?>
+					<input type="hidden" name="action" value="edit_actor" />
+					<input type="hidden" name="actor_id" value="<?php echo $a->getId () ?>" />
+					<input type="submit" name="submit" value="<?php echo _('Edit') ?>" />
+					<?php echo $HTML->closeForm();
+					echo $HTML->openForm(array('action' => '/plugins/'.$plugin->name.'/global_admin.php', 'method' => 'post')); ?>
+					<input type="hidden" name="action" value="del_actor" />
+					<input type="hidden" name="actor_id" value="<?php echo $a->getId () ?>" />
+					<input type="submit" name="submit" value="<?php echo _('Delete') ?>" />
+					<?php echo $HTML->closeForm(); ?>
+				 </td>
+			<?php
+			print '</tr>';
 		}
 		print '</tbody></table>' ;
 	} else {
@@ -282,14 +281,14 @@ case 'display':
 	}
 	$structs = $plugin->getLegalStructures () ;
 	if (count ($structs)) {
+		echo $HTML->openForm(array('action' => '/plugins/'.$plugin->name.'/global_admin.php', 'method' => 'post'));
 		?>
-		<form action="<?php echo util_make_url ('/plugins/'.$plugin->name.'/global_admin.php') ?>" method="post">
 			<input type="hidden" name="action" value="add_actor" />
 			<input type="submit" name="submit" value="<?php echo _('Register new actor') ?>" />
-			</form>
 
-			<?php
-			} else {
+		<?php
+		echo $HTML->closeForm();
+	} else {
 		print _("No legal structures yet, cannot define actors without them.") ;
 	}
 
@@ -305,33 +304,32 @@ case 'display':
 			print '<td>'.htmlspecialchars($s->getName()).'</td>' ;
 			?>
 				<td>
-					 <form action="<?php echo util_make_url ('/plugins/'.$plugin->name.'/global_admin.php') ?>" method="post">
-					 <input type="hidden" name="action" value="edit_structure" />
-					 <input type="hidden" name="structure_id" value="<?php echo $s->getId () ?>" />
-					 <input type="submit" name="submit" value="<?php echo _('Edit') ?>" />
-					 </form>
-					 <form action="<?php echo util_make_url ('/plugins/'.$plugin->name.'/global_admin.php') ?>" method="post">
-					 <input type="hidden" name="action" value="del_structure" />
-					 <input type="hidden" name="structure_id" value="<?php echo $s->getId () ?>" />
-					 <input type="submit" name="submit" value="<?php echo _('Delete') ?>" />
-					 </form>
-					 </td>
-					 <?php
-					 print '</tr>';
+					<?php echo $HTML->openForm(array('action' => '/plugins/'.$plugin->name.'/global_admin.php', 'method' => 'post')); ?>
+					<input type="hidden" name="action" value="edit_structure" />
+					<input type="hidden" name="structure_id" value="<?php echo $s->getId () ?>" />
+					<input type="submit" name="submit" value="<?php echo _('Edit') ?>" />
+					<?php echo $HTML->closeForm();
+					echo $HTML->openForm(array('action' => '/plugins/'.$plugin->name.'/global_admin.php', 'method' => 'post')); ?>
+					<input type="hidden" name="action" value="del_structure" />
+					<input type="hidden" name="structure_id" value="<?php echo $s->getId () ?>" />
+					<input type="submit" name="submit" value="<?php echo _('Delete') ?>" />
+					<?php echo $HTML->closeForm(); ?>
+				</td>
+			<?php
+			print '</tr>';
 		}
 		print '</tbody></table>' ;
 	} else {
 		print _('No legal structures currently defined.') ;
 	}
+	echo $HTML->openForm(array('action' => '/plugins/'.$plugin->name.'/global_admin.php', 'method' => 'post'));
 	?>
-		<form action="<?php echo util_make_url ('/plugins/'.$plugin->name.'/global_admin.php') ?>" method="post">
-			 <input type="hidden" name="action" value="add_structure" />
-			 <input type="submit" name="submit" value="<?php echo _('Register new legal structure') ?>" />
-			 </form>
-			 <?php
-
-			 print '<h1>'._('Existing roles').'</h1>' ;
-	$roles = $plugin->getRoles () ;
+		<input type="hidden" name="action" value="add_structure" />
+		<input type="submit" name="submit" value="<?php echo _('Register new legal structure') ?>" />
+	<?php
+	echo $HTML->closeForm();
+	print '<h1>'._('Existing roles').'</h1>' ;
+	$roles = $plugin->getRoles();
 	if (count ($roles)) {
 		print '<table><thead><tr>' ;
 		print '<td><strong>'._('Short name').'</strong></td>' ;
@@ -344,139 +342,131 @@ case 'display':
 			print '<td>'.htmlspecialchars($r->getDescription()).'</td>' ;
 			?>
 				<td>
-					 <form action="<?php echo util_make_url ('/plugins/'.$plugin->name.'/global_admin.php') ?>" method="post">
-					 <input type="hidden" name="action" value="edit_role" />
-					 <input type="hidden" name="role_id" value="<?php echo $r->getId () ?>" />
-					 <input type="submit" name="submit" value="<?php echo _('Edit') ?>" />
-					 </form>
-					 <form action="<?php echo util_make_url ('/plugins/'.$plugin->name.'/global_admin.php') ?>" method="post">
-					 <input type="hidden" name="action" value="del_role" />
-					 <input type="hidden" name="role_id" value="<?php echo $r->getId () ?>" />
-					 <input type="submit" name="submit" value="<?php echo _('Delete') ?>" />
-					 </form>
-					 </td>
-					 <?php
-					 print '</tr>';
+					<?php echo $HTML->openForm(array('action' => '/plugins/'.$plugin->name.'/global_admin.php', 'method' => 'post')); ?>
+					<input type="hidden" name="action" value="edit_role" />
+					<input type="hidden" name="role_id" value="<?php echo $r->getId () ?>" />
+					<input type="submit" name="submit" value="<?php echo _('Edit') ?>" />
+					<?php echo $HTML->closeForm();
+					echo $HTML->openForm(array('action' => '/plugins/'.$plugin->name.'/global_admin.php', 'method' => 'post')); ?>
+					<input type="hidden" name="action" value="del_role" />
+					<input type="hidden" name="role_id" value="<?php echo $r->getId () ?>" />
+					<input type="submit" name="submit" value="<?php echo _('Delete') ?>" />
+					<?php echo $HTML->closeForm(); ?>
+				</td>
+			<?php
+			print '</tr>';
 		}
 		print '</tbody></table>' ;
 	} else {
 		print _('No roles currently defined.') ;
 	}
+	echo $HTML->openForm(array('action' => '/plugins/'.$plugin->name.'/global_admin.php', 'method' => 'post'));
 	?>
-		<form action="<?php echo util_make_url ('/plugins/'.$plugin->name.'/global_admin.php') ?>" method="post">
-			 <input type="hidden" name="action" value="add_role" />
-			 <input type="submit" name="submit" value="<?php echo _('Register new role') ?>" />
-			 </form>
-			 <?php
-
-			 break ;
+		<input type="hidden" name="action" value="add_role" />
+		<input type="submit" name="submit" value="<?php echo _('Register new role') ?>" />
+	<?php
+	echo $HTML->closeForm();
+	break;
 
 case 'add_role':
 	print '<h1>'._('Register a new role').'</h1>' ;
+	echo $HTML->openForm(array('action' => '/plugins/'.$plugin->name.'/global_admin.php', 'method' => 'post'));
 	?>
-		<form action="<?php echo util_make_url ('/plugins/'.$plugin->name.'/global_admin.php') ?>" method="post">
-			 <input type="hidden" name="action" value="post_add_role" />
-			 <?php echo _('Role Name')._(':') ?> <input type="text" name="role_name" size="20" /><br />
-			 <?php echo _('Role description')._(':') ?><br />
-			 <textarea name="role_desc" rows="20" cols="80"></textarea><br />
-			 <input type="submit" name="submit" value="<?php echo _('Submit') ?>" />
-			 </form>
-
-			 <?php
-			 break ;
+		<input type="hidden" name="action" value="post_add_role" />
+		<?php echo _('Role Name')._(':') ?> <input type="text" name="role_name" size="20" /><br />
+		<?php echo _('Role description')._(':') ?><br />
+		<textarea name="role_desc" rows="20" cols="80"></textarea><br />
+		<input type="submit" name="submit" value="<?php echo _('Submit') ?>" />
+	<?php
+	echo $HTML->closeForm();
+	break;
 
 case 'edit_role':
 	print '<h1>'._('Edit a role').'</h1>' ;
 	$role = new ContribTrackerRole ($role_id) ;
-
+	echo $HTML->openForm(array('action' => '/plugins/'.$plugin->name.'/global_admin.php', 'method' => 'post'));
 	?>
-		<form action="<?php echo util_make_url ('/plugins/'.$plugin->name.'/global_admin.php') ?>" method="post">
-			 <input type="hidden" name="action" value="post_edit_role" />
-			 <input type="hidden" name="role_id" value="<?php echo $role->getId() ?>" />
-			 <?php echo _('Role Name')._(':') ?> <input type="text" name="role_name" size="20" value="<?php echo htmlspecialchars ($role->getName()) ?>" /><br />
-			 <?php echo _('Role description')._(':') ?><br />
-			 <textarea name="role_desc" rows="20" cols="80"><?php echo htmlspecialchars ($role->getDescription()) ?></textarea><br />
-			 <input type="submit" name="submit" value="<?php echo _('Save') ?>" />
-			 </form>
-			 <?php
-			 break ;
+		<input type="hidden" name="action" value="post_edit_role" />
+		<input type="hidden" name="role_id" value="<?php echo $role->getId() ?>" />
+		<?php echo _('Role Name')._(':') ?> <input type="text" name="role_name" size="20" value="<?php echo htmlspecialchars ($role->getName()) ?>" /><br />
+		<?php echo _('Role description')._(':') ?><br />
+		<textarea name="role_desc" rows="20" cols="80"><?php echo htmlspecialchars ($role->getDescription()) ?></textarea><br />
+		<input type="submit" name="submit" value="<?php echo _('Save') ?>" />
+	<?php
+	echo $HTML->closeForm();
+	break;
 
 case 'add_structure':
 	print '<h1>'._('Register a new legal structure').'</h1>' ;
+	echo $HTML->openForm(array('action' => '/plugins/'.$plugin->name.'/global_admin.php', 'method' => 'post'));
 	?>
-		<form action="<?php echo util_make_url ('/plugins/'.$plugin->name.'/global_admin.php') ?>" method="post">
-			 <input type="hidden" name="action" value="post_add_structure" />
-			 <?php echo _('Structure name')._(':') ?> <input type="text" name="structure_name" size="20" /><br />
-			 <input type="submit" name="submit" value="<?php echo _('Submit') ?>" />
-			 </form>
-
-			 <?php
-			 break ;
+		<input type="hidden" name="action" value="post_add_structure" />
+		<?php echo _('Structure name')._(':') ?> <input type="text" name="structure_name" size="20" /><br />
+		<input type="submit" name="submit" value="<?php echo _('Submit') ?>" />
+	<?php
+	echo $HTML->closeForm();
+	break;
 
 case 'edit_structure':
 	print '<h1>'._('Edit a legal structure').'</h1>' ;
 	$structure = new ContribTrackerLegalStructure ($structure_id) ;
-
+	echo $HTML->openForm(array('action' => '/plugins/'.$plugin->name.'/global_admin.php', 'method' => 'post'));
 	?>
-		<form action="<?php echo util_make_url ('/plugins/'.$plugin->name.'/global_admin.php') ?>" method="post">
-			 <input type="hidden" name="action" value="post_edit_structure" />
-			 <input type="hidden" name="structure_id" value="<?php echo $structure->getId() ?>" />
-			 <?php echo _('Structure name')._(':') ?> <input type="text" name="structure_name" size="20" value="<?php echo htmlspecialchars ($structure->getName()) ?>" /><br />
-			 <input type="submit" name="submit" value="<?php echo _('Save') ?>" />
-			 </form>
-			 <?php
-			 break ;
+		<input type="hidden" name="action" value="post_edit_structure" />
+		<input type="hidden" name="structure_id" value="<?php echo $structure->getId() ?>" />
+		<?php echo _('Structure name')._(':') ?> <input type="text" name="structure_name" size="20" value="<?php echo htmlspecialchars ($structure->getName()) ?>" /><br />
+		<input type="submit" name="submit" value="<?php echo _('Save') ?>" />
+	<?php
+	echo $HTML->closeForm();
+	break;
 
 case 'add_actor':
 	print '<h1>'._('Register a new actor').'</h1>' ;
+	echo $HTML->openForm(array('action' => '/plugins/'.$plugin->name.'/global_admin.php', 'method' => 'post', 'enctype' => 'multipart/form-data'));
 	?>
-		<form action="<?php echo util_make_url ('/plugins/'.$plugin->name.'/global_admin.php') ?>" method="post" enctype="multipart/form-data">
-			 <input type="hidden" name="action" value="post_add_actor" />
-			 <?php echo _('Actor name')._(':') ?> <input type="text" name="actor_name" size="20" /><br />
-			 <?php echo _('Actor URL')._(':') ?> <input type="text" name="actor_url" size="20" /><br />
-			 <?php echo _('Actor email')._(':') ?> <input type="text" name="actor_email" size="20" /><br />
-			 <?php echo _('Actor description')._(':') ?><br />
-			 <textarea name="actor_desc" rows="20" cols="80"></textarea><br />
-			 <?php printf (_('Actor logo (PNG, %d kB max)')._(':'), $max_logo_size) ?> <input type="file" name="actor_logo" /><br />
-			 <?php
-			 echo _('Legal structure')._(':') ?>
-			 <select name="structure_id">
-			 <?php
-			 $structs = $plugin->getLegalStructures () ;
+		<input type="hidden" name="action" value="post_add_actor" />
+		<?php echo _('Actor name')._(':') ?> <input type="text" name="actor_name" size="20" /><br />
+		<?php echo _('Actor URL')._(':') ?> <input type="text" name="actor_url" size="20" /><br />
+		<?php echo _('Actor email')._(':') ?> <input type="text" name="actor_email" size="20" /><br />
+		<?php echo _('Actor description')._(':') ?><br />
+		<textarea name="actor_desc" rows="20" cols="80"></textarea><br />
+		<?php printf (_('Actor logo (PNG, %d kB max)')._(':'), $max_logo_size) ?> <input type="file" name="actor_logo" /><br />
+		<?php echo _('Legal structure')._(':') ?>
+		<select name="structure_id">
+	<?php
+	$structs = $plugin->getLegalStructures () ;
 	foreach ($structs as $s) {
 		print '<option value="'.$s->getId().'">'.htmlspecialchars($s->getName()).'</option>' ;
 	}
 	?>
 		</select><br />
-			  <input type="submit" name="submit" value="<?php echo _('Submit') ?>" />
-			  </form>
-
-			  <?php
-			  break ;
+		<input type="submit" name="submit" value="<?php echo _('Submit') ?>" />
+	<?php
+	echo $HTML->closeForm();
+	break;
 
 case 'edit_actor':
 	print '<h1>'._('Edit an actor').'</h1>' ;
 	$actor = new ContribTrackerActor ($actor_id) ;
-
+	echo $HTML->openForm(array('action' => '/plugins/'.$plugin->name.'/global_admin.php', 'method' => 'post', 'enctype' => 'multipart/form-data'));
 	?>
-		<form action="<?php echo util_make_url ('/plugins/'.$plugin->name.'/global_admin.php') ?>" method="post" enctype="multipart/form-data">
-			 <input type="hidden" name="action" value="post_edit_actor" />
-			 <input type="hidden" name="actor_id" value="<?php echo $actor->getId() ?>" />
-			 <?php echo _('Actor name')._(':') ?> <input type="text" name="actor_name" size="20" value="<?php echo htmlspecialchars ($actor->getName()) ?>" /><br />
-			 <?php echo _('Actor URL')._(':') ?> <input type="text" name="actor_url" size="20" value="<?php echo htmlspecialchars ($actor->getUrl()) ?>" /><br />
-			 <?php echo _('Actor email')._(':') ?> <input type="text" name="actor_email" size="20" value="<?php echo htmlspecialchars ($actor->getEmail()) ?>" /><br />
-			 <?php echo _('Actor description')._(':') ?><br />
-			 <textarea name="actor_desc" rows="20" cols="80"><?php echo htmlspecialchars ($actor->getDescription()) ?></textarea><br />
-			 <?php printf (_('Actor logo (PNG, %d kB max)')._(':'), $max_logo_size) ?> <input type="file" name="actor_logo" /><br />
-			 <?php
-			 if ($actor->getLogo() != '') {
-				 print '<img type="image/png" src="'.util_make_url ('/plugins/'.$plugin->name.'/actor_logo.php?actor_id='.$actor->getId ()).'" />' ;
-			 }
+		<input type="hidden" name="action" value="post_edit_actor" />
+		<input type="hidden" name="actor_id" value="<?php echo $actor->getId() ?>" />
+		<?php echo _('Actor name')._(':') ?> <input type="text" name="actor_name" size="20" value="<?php echo htmlspecialchars ($actor->getName()) ?>" /><br />
+		<?php echo _('Actor URL')._(':') ?> <input type="text" name="actor_url" size="20" value="<?php echo htmlspecialchars ($actor->getUrl()) ?>" /><br />
+		<?php echo _('Actor email')._(':') ?> <input type="text" name="actor_email" size="20" value="<?php echo htmlspecialchars ($actor->getEmail()) ?>" /><br />
+		<?php echo _('Actor description')._(':') ?><br />
+		<textarea name="actor_desc" rows="20" cols="80"><?php echo htmlspecialchars ($actor->getDescription()) ?></textarea><br />
+		<?php printf (_('Actor logo (PNG, %d kB max)')._(':'), $max_logo_size) ?> <input type="file" name="actor_logo" /><br />
+		<?php
+	if ($actor->getLogo() != '') {
+		print '<img type="image/png" src="'.util_make_url ('/plugins/'.$plugin->name.'/actor_logo.php?actor_id='.$actor->getId ()).'" />' ;
+	}
 	print '<br />' ;
-			 echo _('Legal structure')._(':') ?>
-			 <select name="structure_id">
-			 <?php
-			 $structs = $plugin->getLegalStructures () ;
+	echo _('Legal structure')._(':') ?>
+	<select name="structure_id">
+	<?php
+	$structs = $plugin->getLegalStructures () ;
 	foreach ($structs as $s) {
 		print '<option value="'.$s->getId().'".' ;
 		if ($s->getId() == $actor->getLegalStructure()->getId()) {
@@ -486,10 +476,10 @@ case 'edit_actor':
 	}
 	?>
 		</select><br />
-			  <input type="submit" name="submit" value="<?php echo _('Save') ?>" />
-			  </form>
-			  <?php
-			  break ;
+		<input type="submit" name="submit" value="<?php echo _('Save') ?>" />
+	<?php
+	echo $HTML->closeForm();
+	break;
 
 }
 
diff --git a/src/plugins/contribtracker/www/project_admin.php b/src/plugins/contribtracker/www/project_admin.php
index c7fb553..7982baa 100644
--- a/src/plugins/contribtracker/www/project_admin.php
+++ b/src/plugins/contribtracker/www/project_admin.php
@@ -1,15 +1,33 @@
 <?php
-
-/*
+/**
  * ContribTracker plugin
  *
  * Copyright 2009, Roland Mas
+ * Copyright 2016, Franck Villaume - TrivialDev
+ * http://fusionforge.org/
+ *
+ * This file is part of FusionForge. FusionForge is free software;
+ * you can redistribute it and/or modify it under the terms of the
+ * GNU General Public License as published by the Free Software
+ * Foundation; either version 2 of the Licence, or (at your option)
+ * any later version.
+ *
+ * FusionForge is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
  *
+ * You should have received a copy of the GNU General Public License along
+ * with FusionForge; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
  */
 
 require_once '../../env.inc.php';
 require_once $gfcommon.'include/pre.php';
-$plugin = plugin_get_object('contribtracker') ;
+
+global $HTML;
+
+$plugin = plugin_get_object('contribtracker');
 
 $group_id = getIntFromRequest('group_id') ;
 session_require_perm('project_admin', $group_id) ;
@@ -181,9 +199,9 @@ if(isset($error_msg) && !empty($error_msg)) {
 }
 switch ($action) {
 case 'add_contrib':
-	print '<h1>'._('Register a new contribution').'</h1>' ;
+	print '<h1>'._('Register a new contribution').'</h1>';
+	echo $HTML->openForm(array('action' => '/plugins/'.$plugin->name.'/project_admin.php', 'method' => 'post'));
 ?>
-<form action="<?php echo util_make_url ('/plugins/'.$plugin->name.'/project_admin.php') ?>" method="post">
 <input type="hidden" name="action" value="post_add_contrib" />
 <input type="hidden" name="group_id" value="<?php echo $group_id ?>" />
 <?php echo _('Contribution name')._(':') ?> <input type="text" name="contrib_name" size="20" /><br />
@@ -191,9 +209,9 @@ case 'add_contrib':
 <?php echo _('Contribution description')._(':') ?><br />
 <textarea name="contrib_desc" rows="20" cols="80"></textarea><br />
 <input type="submit" name="submit" value="<?php echo _('Submit') ?>" />
-</form>
 
 <?php
+	echo $HTML->closeForm();
 	 break ;
 case 'edit_contrib':
 	print '<h1>'._('Edit a contribution').'</h1>' ;
@@ -201,9 +219,8 @@ case 'edit_contrib':
 	$contrib = new ContribTrackerContribution ($contrib_id) ;
 
 	print '<h3>'._('Contribution details').'</h3>' ;
-
+	echo $HTML->openForm(array('action' => '/plugins/'.$plugin->name.'/project_admin.php', 'method' => 'post'));
 ?>
-<form action="<?php echo util_make_url ('/plugins/'.$plugin->name.'/project_admin.php') ?>" method="post">
 <input type="hidden" name="action" value="post_edit_contrib" />
 <input type="hidden" name="group_id" value="<?php echo $group_id ?>" />
 <input type="hidden" name="contrib_id" value="<?php echo $contrib->getId() ?>" />
@@ -212,10 +229,9 @@ case 'edit_contrib':
 <?php echo _('Contribution description')._(':') ?><br />
 <textarea name="contrib_desc" rows="20" cols="80"><?php echo htmlspecialchars ($contrib->getDescription()) ?></textarea><br />
 <input type="submit" name="submit" value="<?php echo _('Save') ?>" />
-</form>
 <?php
-
-	 print '<h3>'._('Current participants').'</h3>' ;
+	echo $HTML->closeForm();
+	print '<h3>'._('Current participants').'</h3>' ;
 
 	$parts = $contrib->getParticipations () ;
 	print '<strong>'.ngettext('Participant:',
@@ -230,31 +246,32 @@ case 'edit_contrib':
 			util_make_link ('/plugins/'.$plugin->name.'/?actor_id='.$p->getActor()->getId (),
 					htmlspecialchars ($p->getActor()->getName())),
 			htmlspecialchars ($p->getActor()->getLegalStructure()->getName())) ;
+		echo $HTML->openForm(array('action' => '/plugins/'.$plugin->name.'/project_admin.php', 'method' => 'post'));
 ?>
-<form action="<?php echo util_make_url ('/plugins/'.$plugin->name.'/project_admin.php') ?>" method="post">
 <input type="hidden" name="action" value="del_part" />
 <input type="hidden" name="group_id" value="<?php echo $group_id ?>" />
 <input type="hidden" name="contrib_id" value="<?php echo $contrib->getId() ?>" />
 <input type="hidden" name="part_id" value="<?php echo $p->getId() ?>" />
 <input type="submit" name="submit" value="<?php echo _('Delete') ?>" />
-</form>
-<form action="<?php echo util_make_url ('/plugins/'.$plugin->name.'/project_admin.php') ?>" method="post">
+<?php
+		echo $HTML->closeForm();
+		echo $HTML->openForm(array('action' => '/plugins/'.$plugin->name.'/project_admin.php', 'method' => 'post'));
+?>
 <input type="hidden" name="action" value="move_part" />
 <input type="hidden" name="group_id" value="<?php echo $group_id ?>" />
 <input type="hidden" name="contrib_id" value="<?php echo $contrib->getId() ?>" />
 <input type="hidden" name="part_id" value="<?php echo $p->getId() ?>" />
 <input type="submit" name="down" value="<?php echo _('Move participant down') ?>" />
 <input type="submit" name="up" value="<?php echo _('Move participant up') ?>" />
-</form>
 <?php
+		echo $HTML->closeForm();
 		print '</li>' ;
 	}
 	print '</ul>' ;
 
-	  print '<h3>'._('Add a participant').'</h3>' ;
-
+	print '<h3>'._('Add a participant').'</h3>' ;
+	echo $HTML->openForm(array('action' => '/plugins/'.$plugin->name.'/project_admin.php', 'method' => 'post'));
 ?>
-<form action="<?php echo util_make_url ('/plugins/'.$plugin->name.'/project_admin.php') ?>" method="post">
 <input type="hidden" name="action" value="add_part" />
 <input type="hidden" name="group_id" value="<?php echo $group_id ?>" />
 <input type="hidden" name="contrib_id" value="<?php echo $contrib->getId() ?>" />
@@ -275,10 +292,9 @@ case 'edit_contrib':
 ?>
 </select>
 <input type="submit" name="submit" value="<?php echo _('Add participant') ?>" />
-</form>
 <?php
-
-	 break ;
+	echo $HTML->closeForm();
+	break ;
 case 'display':
 	$contribs = $plugin->getContributionsByGroup ($group) ;
 	if (count ($contribs) != 0) {
@@ -310,33 +326,37 @@ case 'display':
 				print '</li>' ;
 			}
 			print '</ul>' ;
+			echo $HTML->openForm(array('action' => '/plugins/'.$plugin->name.'/project_admin.php', 'method' => 'post'));
+
 ?>
-<form action="<?php echo util_make_url ('/plugins/'.$plugin->name.'/project_admin.php') ?>" method="post">
 <input type="hidden" name="action" value="edit_contrib" />
 <input type="hidden" name="group_id" value="<?php echo $group_id ?>" />
 <input type="hidden" name="contrib_id" value="<?php echo $c->getId() ?>" />
 <input type="submit" name="submit" value="<?php echo _('Edit') ?>" />
-</form>
-<form action="<?php echo util_make_url ('/plugins/'.$plugin->name.'/project_admin.php') ?>" method="post">
+<?php
+			echo $HTML->closeForm();
+			echo $HTML->openForm(array('action' => '/plugins/'.$plugin->name.'/project_admin.php', 'method' => 'post'));
+?>
 <input type="hidden" name="action" value="del_contrib" />
 <input type="hidden" name="group_id" value="<?php echo $group_id ?>" />
 <input type="hidden" name="contrib_id" value="<?php echo $c->getId() ?>" />
 <input type="submit" name="submit" value="<?php echo _('Delete'); ?>" />
-</form>
+<?php			echo $HTML->closeForm(); ?>
 <hr />
 <?php
 		}
 	} else {
 		print '<h1>'._('No contributions for this project yet.').'</h1>' ;
 	}
+	echo $HTML->openForm(array('action' => '/plugins/'.$plugin->name.'/project_admin.php', 'method' => 'post'));
+
 ?>
-<form action="<?php echo util_make_url ('/plugins/'.$plugin->name.'/project_admin.php') ?>" method="post">
 <input type="hidden" name="action" value="add_contrib" />
 <input type="hidden" name="group_id" value="<?php echo $group_id ?>" />
 <input type="submit" name="submit" value="<?php echo _('Add new contribution') ?>" />
-</form>
 <?php
-	break ;
+	echo $HTML->closeForm();
+	break;
 }
 
 site_project_footer();
diff --git a/src/plugins/projectlabels/www/index.php b/src/plugins/projectlabels/www/index.php
index 7a97fd7..89ac2e0 100644
--- a/src/plugins/projectlabels/www/index.php
+++ b/src/plugins/projectlabels/www/index.php
@@ -1,14 +1,32 @@
 <?php
-/*
+/**
  * Project labels plugin
  *
  * Roland Mas <lolando at debian.org>
+ * Copyright 2016, 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
+ * GNU General Public License as published by the Free Software
+ * Foundation; either version 2 of the Licence, or (at your option)
+ * any later version.
+ *
+ * FusionForge is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with FusionForge; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
  */
 
 require_once '../../../www/env.inc.php';
 require_once $gfcommon.'include/pre.php';
 require_once $gfwww.'admin/admin_utils.php';
 
+global $HTML;
+
 site_admin_header(array('title'=>_('Project labels')));
 
 $func = getStringFromRequest ('func') ;
@@ -112,20 +130,20 @@ if ($func == 'edit') {
 		         WHERE label_id=$1',
 			array($label_id));
 	$row = db_fetch_array($res) ;
-?>
-<form name="edit_label" action="<?php echo util_make_url ('/plugins/projectlabels/') ; ?>" method="post">
+
+	echo $HTML->openForm(array('name' => 'edit_label', 'action' => '/plugins/projectlabels/', 'method' => 'post'));
+	?>
 <input type="hidden" name="func" value="editlabel" />
 <input type="hidden" name="label_id" value="<?php echo $label_id ?>" />
 <?php echo utils_requiredField(); ?>
-	 <?php echo _('Label name:') ; ?><br/>
+<?php echo _('Label name')._(': '); ?><br/>
 <input type="text" required="required" size="15" maxlength="32" name="label_name" value="<?php echo stripslashes ($row['label_name']) ; ?>"/> <br/>
-						  <?php echo _('Displayed text (or HTML) for the label:') ; ?><br/>
-<textarea tabindex='1' accesskey="," name="label_text" rows='5'
-														       cols='80'><?php echo $row['label_text'] ; ?></textarea><br/>
-																							   <?php echo _('This label currently looks like this:') ." " . $row['label_text'] ; ?>
+<?php echo _('Displayed text (or HTML) for the label')._(': ') ; ?><br/>
+<textarea tabindex='1' accesskey="," name="label_text" rows='5' cols='80'><?php echo $row['label_text'] ; ?></textarea><br/>
+<?php echo _('This label currently looks like this')._(': ').$row['label_text'] ; ?>
 <input type="submit" value="<?php echo _('Save this label') ?>" />
-</form>
 <?php
+	echo $HTML->closeForm();
 }
 ?>
 
@@ -142,7 +160,7 @@ if (db_numrows($res) >= 1) {
 
 	while ($row = db_fetch_array($res)) {
 		echo "<h3>".stripslashes ($row['label_name'])."</h3>" ;
-		echo "<br />" . _('This label currently looks like this:') ." ";
+		echo "<br />" . _('This label currently looks like this')._(': ');
 		echo $row['label_text'] . "<br />" ;
 
 		$res2 = db_query_params ('SELECT groups.unix_group_name, groups.group_name, groups.group_id FROM groups, plugin_projectlabels_group_labels
@@ -167,44 +185,42 @@ if (db_numrows($res) >= 1) {
 		} else {
 			echo _('This label is not used on any group.')."<br />" ;
 		}
-		?>
-<form name="addlabeltoproject" method="post" action="<?php echo util_make_url ('/plugins/projectlabels/') ; ?>">
-	 <?php echo _('Project Unix Name')._(': '); ?>
+		echo $HTML->openForm(array('name' => 'addlabeltoproject', 'method' => 'post', 'action' => '/plugins/projectlabels/'));
+		echo _('Project Unix Name')._(': '); ?>
 <input type=text name=group_uname>
 <input type="hidden" name="func" value="addlabeltoproject">
 <input type="submit" value="<?php echo _('Add label to project') ?>">
 <input type="hidden" value="<?php echo $row['label_id'] ;?>" name=label_id>
-</form>
 <?php
-	 echo util_make_link ('/plugins/projectlabels/?func=edit&label_id='.$row['label_id'],
+		echo $HTML->closeForm();
+		echo util_make_link ('/plugins/projectlabels/?func=edit&label_id='.$row['label_id'],
 			      _('[Edit this label]')) ;
-	 echo util_make_link ('/plugins/projectlabels/?func=delete&label_id='.$row['label_id'],
+		echo util_make_link ('/plugins/projectlabels/?func=delete&label_id='.$row['label_id'],
 			      _('[Delete this label]')) ;
 	}
 }
 ?>
 </p>
 
-		  <p><?php
-
-		  echo "<h2>"._('Add new labels')."</h2>" ;
-		  echo _('You can create new labels with the form below.') ?></p>
+		<p><?php
 
-<form name="new_label" action="<?php echo util_make_url ('/plugins/projectlabels/') ; ?>" method="post">
+echo "<h2>"._('Add new labels')."</h2>" ;
+echo _('You can create new labels with the form below.') ?></p>
+		<?php echo $HTML->openForm(array('name' => 'new_label', 'action' => '/plugins/projectlabels/', 'method' => 'post')); ?>
 <p>
 <input type="hidden" name="func" value="addlabel" />
 <?php echo utils_requiredField(); ?>
-		  <?php echo _('Name of the label:') ; ?><br/>
+		  <?php echo _('Name of the label')._(': ') ; ?><br/>
 <input type="text" required="required" size="15" maxlength="32" name="label_name" value="<?php echo _('potm') ; ?>"/> <br/>
-		  <?php echo _('Displayed text (or HTML) for the label:') ; ?><br/>
+		  <?php echo _('Displayed text (or HTML) for the label')._(': ') ; ?><br/>
 <textarea tabindex='1' accesskey="," name="label_text" rows='5'
 		  cols='80'><p><b><?php echo _('Project of the month!') ; ?></b></p>
 </textarea><br/>
 <input type="submit" value="<?php echo _('Add label') ?>" />
 </p>
-</form>
 
 <?php
+echo $HTML->closeForm();
 site_admin_footer();
 
 // Local Variables:
diff --git a/src/www/admin/globalroleedit.php b/src/www/admin/globalroleedit.php
index 99f3c94..c3a3680 100644
--- a/src/www/admin/globalroleedit.php
+++ b/src/www/admin/globalroleedit.php
@@ -4,7 +4,7 @@
  *
  * Copyright 2010-2011, Roland Mas
  * Copyright (c) 2011 Thorsten Glaser <t.glaser at tarent.de>
- * Copyright 2013-2014, Franck Villaume - TrivialDev
+ * Copyright 2013-2014,2016, 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
@@ -27,6 +27,8 @@ require_once $gfcommon.'include/pre.php';
 require_once $gfwww.'admin/admin_utils.php';
 require_once $gfwww.'include/role_utils.php';
 
+global $HTML;
+
 site_admin_header(array('title'=>_('Site Admin')));
 
 $role_id = getIntFromRequest('role_id');
@@ -144,9 +146,8 @@ if ($role instanceof RoleExplicit) {
 	if (count ($users) > 0) {
 		echo '<p><strong>'._('Current users with this role').'</strong></p>' ;
 
-		echo '
-		<form action="'.util_make_uri('/admin/globalroleedit.php').'" method="post">
-		<input type="hidden" name="role_id" value="'.$role_id.'" />';
+		echo $HTML->openForm(array('action' => '/admin/globalroleedit.php', 'method' => 'post'));
+		echo '<input type="hidden" name="role_id" value="'.$role_id.'" />';
 		$titleArr = array(_('User Name'), _('Remove'));
 		echo $HTML->listTableTop($titleArr);
 		foreach ($users as $user) {
@@ -166,28 +167,23 @@ if ($role instanceof RoleExplicit) {
 		$cells[] = array('<input type="submit" name="dormusers" value="'._('Remove').'" />', 'colspan' => 2);
 		echo $HTML->multiTableRow(array(), $cells);
 		echo $HTML->listTableBottom();
-		echo '</form>';
+		echo $HTML->closeForm();
 	} else {
 		echo '<p><strong>'._('No users currently have this role').'</strong></p>' ;
 	}
 
-			?>
-		<form
-			action="<?php echo util_make_uri('/admin/globalroleedit.php'); ?>"
-			method="post">
-		<p><input type="text"
+	echo $HTML->openForm(array('action' => '/admin/globalroleedit.php', 'method' => 'post')); ?>
+	<p><input type="text"
 			name="form_unix_name" size="10" value="" />
 		<input type="submit" name="adduser"
 			value="<?php echo _("Add User") ?>" />
 		<input type="hidden" name="role_id" value="<?php echo $role_id; ?>" />
 		</p>
-		</form>
 <?php
+	echo $HTML->closeForm();
 }
 
-echo '
-<p>
-<form action="'.util_make_uri('/admin/globalroleedit.php').'" method="post">';
+echo $HTML->openForm(array('action' => '/admin/globalroleedit.php', 'method' => 'post'));
 echo '<input type="hidden" name="role_id" value="'.$role_id.'" />' ;
 
 if ($role instanceof RoleExplicit) {
@@ -232,17 +228,16 @@ for ($i=0; $i<count($keys); $i++) {
 }
 echo $HTML->listTableBottom();
 
-echo '<p><input type="submit" name="submit" value="'._('Submit').'" /></p>
-</form>';
+echo '<p><input type="submit" name="submit" value="'._('Submit').'" /></p>';
+echo $HTML->closeForm();
 
-echo '
-<form action="'.util_make_url('/admin/globalroledelete.php').'" method="post">';
+echo $HTML->openForm(array('action' => '/admin/globalroledelete.php', 'method' => 'post'));
 echo '<input type="hidden" name="role_id" value="'.$role_id.'" />';
 
 echo '<p><strong>'._('Delete role').'</strong></p>';
 echo '<p><input type="checkbox" name="sure" value="1"/> '._("Really delete this role?");
-echo '<input type="submit" name="submit" value="'._('Delete role').'" /></p>
-</form>';
+echo '<input type="submit" name="submit" value="'._('Delete role').'" /></p>';
+echo $HTML->closeForm();
 
 site_admin_footer();
 

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

Summary of changes:
 src/common/forum/ForumHTML.class.php               |  15 +-
 src/plugins/authcas/common/AuthCASPlugin.class.php |  17 +-
 .../authhttpd/common/AuthHTTPDPlugin.class.php     |  22 +-
 .../authopenid/include/AuthOpenIDPlugin.class.php  |  19 +-
 src/plugins/contribtracker/www/global_admin.php    | 266 ++++++++++-----------
 src/plugins/contribtracker/www/project_admin.php   |  76 +++---
 src/plugins/projectlabels/www/index.php            |  64 +++--
 src/www/admin/globalroleedit.php                   |  35 ++-
 8 files changed, 264 insertions(+), 250 deletions(-)


hooks/post-receive
-- 
FusionForge



More information about the Fusionforge-commits mailing list