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

Franck Villaume nerville at fusionforge.org
Tue Mar 18 18:07:08 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  1b893ad78ecd8fe6fc1e808d1e5fb2343ffdf0db (commit)
      from  dfdd69b951f6c909d531b487569dab62587c7a34 (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 1b893ad78ecd8fe6fc1e808d1e5fb2343ffdf0db
Author: Franck Villaume <franck.villaume at trivialdev.com>
Date:   Tue Mar 18 18:06:44 2014 +0100

    Use HTML->information, HTML->error_msg, HTML->warning_msg

diff --git a/src/plugins/headermenu/view/admin/viewGlobalConfiguration.php b/src/plugins/headermenu/view/admin/viewGlobalConfiguration.php
index 8e7f9ac..8032882 100644
--- a/src/plugins/headermenu/view/admin/viewGlobalConfiguration.php
+++ b/src/plugins/headermenu/view/admin/viewGlobalConfiguration.php
@@ -55,7 +55,7 @@ $linksHeaderMenuArray = $headermenu->getAvailableLinks('headermenu');
 $linksOuterMenuArray = $headermenu->getAvailableLinks('outermenu');
 
 if (sizeof($linksHeaderMenuArray) || sizeof($linksOuterMenuArray)) {
-	echo '<p class="information">'. _('You can reorder tabs, just drag & drop rows in the table below and save order. Please note that those extra tabs can only appear after the standard tabs. And you can only move them inside the set of extra tabs.').'</p>';
+	echo $HTML->information(_('You can reorder tabs, just drag & drop rows in the table below and save order. Please note that those extra tabs can only appear after the standard tabs. And you can only move them inside the set of extra tabs.'));
 }
 if (sizeof($linksHeaderMenuArray)) {
 	echo '<h2>'._('Manage available tabs in headermenu').'</h2>';
@@ -87,7 +87,7 @@ if (sizeof($linksHeaderMenuArray)) {
 	echo '<input type="button" id="linkorderheadervalidatebutton" value="'._('Save Order').'" style="display:none;" />';
 	echo '<br/>';
 } else {
-	echo '<p class="information">'._('No tabs available for headermenu').'</p>';
+	echo $HTML->information(_('No tabs available for headermenu'));
 }
 
 if (sizeof($linksOuterMenuArray)) {
@@ -120,11 +120,11 @@ if (sizeof($linksOuterMenuArray)) {
 	echo '<input type="button" id="linkorderoutervalidatebutton" value="'._('Save Order').'" style="display:none;" />';
 	echo '<br/>';
 } else {
-	echo '<p class="information">'._('No tabs available for outermenu').'</p>';
+	echo $HTML->information(_('No tabs available for outermenu'));
 }
 
 echo '<h2>'._('Add new tab').'</h2>';
-echo '<p class="information">'._('You can add specific tabs in outermenu (main tab) or headermenu (next to the login) with the form below.').'</p>';
+echo $HTML->information(_('You can add specific tabs in outermenu (main tab) or headermenu (next to the login) with the form below.'));
 echo '<form method="POST" name="addLink" action="index.php?type=globaladmin&action=addLink">';
 echo '<table class="infotable"><tr>';
 echo '<td>'._('Displayed Name')._(':').'</td><td><input required="required" name="name" type="text" maxlength="255" /></td>';
diff --git a/src/plugins/headermenu/view/admin/viewProjectConfiguration.php b/src/plugins/headermenu/view/admin/viewProjectConfiguration.php
index 3fd8443..5850953 100644
--- a/src/plugins/headermenu/view/admin/viewProjectConfiguration.php
+++ b/src/plugins/headermenu/view/admin/viewProjectConfiguration.php
@@ -52,7 +52,7 @@ jQuery(document).ready(function() {
 $linksArray = $headermenu->getAvailableLinks('groupmenu', $group_id);
 if (sizeof($linksArray)) {
 	echo '<h2>'._('Manage available tabs')."</h2>\n";
-	echo '<p class="information">'. _('You can reorder tabs, just drag & drop rows in the table below and save order. Please note that those extra tabs can only appear after the standard tabs. And you can only move them inside the set of extra tabs.').'</p>';
+	echo $HTML->information(_('You can reorder tabs, just drag & drop rows in the table below and save order. Please note that those extra tabs can only appear after the standard tabs. And you can only move them inside the set of extra tabs.'));
 	$tabletop = array(_('Order'), _('Tab Type'), _('Displayed Name'), _('Description'), _('Status'), _('Actions'));
 	$classth = array('', '', '', '', '', 'unsortable');
 	echo $HTML->listTableTop($tabletop, false, 'sortable_headermenu_listlinks', 'sortable', $classth);
@@ -87,7 +87,7 @@ if (sizeof($linksArray)) {
 }
 
 echo '<h2>'._('Add new tab')."</h2>\n";
-echo '<p class="information">'._('You can add your own tabs in the menu bar with the form below.').'</p>';
+echo $HTML->information(_('You can add your own tabs in the menu bar with the form below.'));
 echo '<form method="POST" name="addLink" action="index.php?type=projectadmin&group_id='.$group_id.'&action=addLink">';
 echo '<table class="infotable">'."\n";
 echo '<tr>';
diff --git a/src/plugins/phpcaptcha/common/phpcaptchaPlugin.class.php b/src/plugins/phpcaptcha/common/phpcaptchaPlugin.class.php
index 001592d..05a8052 100644
--- a/src/plugins/phpcaptcha/common/phpcaptchaPlugin.class.php
+++ b/src/plugins/phpcaptcha/common/phpcaptchaPlugin.class.php
@@ -4,7 +4,7 @@
  * phpcaptchaPlugin Class
  *
  * Copyright 2010, Luis Daniel Ibáñez
- * Copyright 2013, Franck Villaume - TrivialDev
+ * Copyright 2013-2014, Franck Villaume - TrivialDev
  * http://fusionforge.org
  *
  * This file is part of FusionForge. FusionForge is free software;
@@ -30,7 +30,7 @@ class phpcaptchaPlugin extends Plugin {
 	function __construct() {
 		$this->Plugin();
 		$this->name = 'phpcaptcha';
-		$this->text = 'Enable use of phpcaptcha (more information www.phpcaptcha.org)';
+		$this->text = _('Enable use of phpcaptcha (more information www.phpcaptcha.org)');
 		$this->_addHook('captcha_check');
 		$this->_addHook('captcha_form');
 		$this->phpcaptcha_path = forge_get_config('phpcaptcha_path', 'phpcaptcha');
@@ -47,6 +47,7 @@ class phpcaptchaPlugin extends Plugin {
 	}
 
 	function captcha_form() {
+		global $HTML;
 		if ($this->checkConfig()) {
 			echo '<p>
 				<img id="captcha" src="/plugins/'.$this->name.'/securimage_show.php" alt="CAPTCHA Image" />
@@ -57,7 +58,7 @@ class phpcaptchaPlugin extends Plugin {
 			echo '<input type="text" name="captcha_code" size="10" maxlength="6" />';
 			echo '</p>';
 		} else {
-			echo '<p class="information">'._('phpcaptcha seems not installed. Contact your administrator for more informations.').'</p>';
+			echo $HTML->information(_('phpcaptcha seems not installed. Contact your administrator for more informations.'));
 		}
 	}
 
diff --git a/src/plugins/projects-hierarchy/view/admin_project_link.php b/src/plugins/projects-hierarchy/view/admin_project_link.php
index 24eed6e..c32f27e 100644
--- a/src/plugins/projects-hierarchy/view/admin_project_link.php
+++ b/src/plugins/projects-hierarchy/view/admin_project_link.php
@@ -56,7 +56,7 @@ if ($projectsHierarchy->isUsed($group_id)) {
 	echo '<input type="submit" value="'._('Add Child project').'">';
 	echo '</form>';
 } else {
-	echo '<p class="information">'._('No other project using project hierarchy plugin.').'</p>';
+	echo $HTML->information(_('No other project using project hierarchy plugin.'));
 }
 
 echo '<h4>'._('Pending hierarchy request').'</h4>';
@@ -85,4 +85,4 @@ if (sizeof($pendingChilds)) {
 }
 
 if (!sizeof($pendingParent) && !sizeof($pendingChilds))
-	echo '<p class="information">'._('No pending requests').'</p>';
+	echo $HTML->information(_('No pending requests'));
diff --git a/src/plugins/scmgit/common/scmgit_Widget_MyRepositories.class.php b/src/plugins/scmgit/common/scmgit_Widget_MyRepositories.class.php
index 1d851c1..f42caa8 100644
--- a/src/plugins/scmgit/common/scmgit_Widget_MyRepositories.class.php
+++ b/src/plugins/scmgit/common/scmgit_Widget_MyRepositories.class.php
@@ -29,7 +29,7 @@ class scmgit_Widget_MyRepositories extends Widget {
 	}
 
 	function getTitle() {
-		return _("My Git cloned Repositories List");
+		return _('My Git cloned Repositories List');
 	}
 
 	function getCategory() {
@@ -37,24 +37,27 @@ class scmgit_Widget_MyRepositories extends Widget {
 	}
 
 	function getDescription() {
-		return _("Get the list of URLS of your personal Git repository cloned from projects.");
+		return _('Get the list of URLS of your personal Git repository cloned from projects.');
 	}
 
 	function getContent() {
+		global $HTML;
 		$user = UserManager::instance()->getCurrentUser();
 		$scmgitplugin = plugin_get_object('scmgit');
 		$GitRepositories = $this->getMyRepositoriesList($scmgitplugin);
 		if (count($GitRepositories)) {
-			$returnhtml = '<table>';
+			$returnhtml = $HTML->listTableTop(array());
 			foreach ($GitRepositories as $GitRepository) {
 				$project = group_get_object($GitRepository);
-				$returnhtml .= '<tr><td><tt>git clone git+ssh://'.$user->getUnixName().'@' . $scmgitplugin->getBoxForProject($project) .'/'. forge_get_config('scm_root', 'scmgit') .'/'. $project->getUnixName() .'/users/'. $user->getUnixName() .'.git</tt></td>'.
-						'<td>'.util_make_link('/scm/browser.php?group_id='.$project->getID().'&user_id='.$user->getID(), _('Browse Git Repository')).'</td><tr>';
+				$cells = array();
+				$cells[][] = '<tt>git clone git+ssh://'.$user->getUnixName().'@' . $scmgitplugin->getBoxForProject($project) .'/'. forge_get_config('scm_root', 'scmgit') .'/'. $project->getUnixName() .'/users/'. $user->getUnixName() .'.git</tt>';
+				$cells[][] = util_make_link('/scm/browser.php?group_id='.$project->getID().'&user_id='.$user->getID(), _('Browse Git Repository'));
+				$returnhtml .= $HTML->multiTableRow(array(), $cells);
 			}
-			$returnhtml .= '</table>';
+			$returnhtml .= $HTML->listTableBottom();
 			return $returnhtml;
 		} else {
-			return '<p class="information">'._('No personal git repository').'</p>';
+			return $HTML->information(_('No personal git repository'));
 		}
 	}
 
diff --git a/src/plugins/scmhook/common/scmhookPlugin.class.php b/src/plugins/scmhook/common/scmhookPlugin.class.php
index 168bccf..1c3c53e 100644
--- a/src/plugins/scmhook/common/scmhookPlugin.class.php
+++ b/src/plugins/scmhook/common/scmhookPlugin.class.php
@@ -3,7 +3,7 @@
  * scmhookPlugin Class
  * Copyright 2011, Franck Villaume - Capgemini
  * Copyright (C) 2012 Alain Peyrat - Alcatel-Lucent
- * Copyright 2012-2013, Franck Villaume - TrivialDev
+ * Copyright 2012-2014, Franck Villaume - TrivialDev
  * Copyright 2012, Benoit Debaenst - TrivialDev
  *
  * This file is part of FusionForge. FusionForge is free software;
@@ -136,7 +136,7 @@ class scmhookPlugin extends Plugin {
 		if (count($hooksAvailable)) {
 			echo '<div id="scmhook">';
 			if ($statusDeploy)
-				echo '<p class="warning">'._('Hooks management update process waiting ...').'</p>';
+				echo $HTML->warning_msg(_('Hooks management update process waiting ...'));
 
 			echo '<h2>'._('Enable Repository Hooks').'</h2>';
 			switch ($scm) {
@@ -153,13 +153,13 @@ class scmhookPlugin extends Plugin {
 					break;
 				}
 				default: {
-					echo '<div class="warning">'._('SCM Type not supported yet by scmhook').'</div>';
+					echo $HTML->warning_msg(_('SCM Type not supported yet by scmhook'));
 					break;
 				}
 			}
 			echo '</div><p />';
 		} else {
-			echo '<p class="information">'._('No hooks available').'</p>';
+			echo $HTML->information(_('No hooks available'));
 		}
 	}
 
diff --git a/src/www/snippet/add_snippet_to_package.php b/src/www/snippet/add_snippet_to_package.php
index 008e846..c9eb894 100644
--- a/src/www/snippet/add_snippet_to_package.php
+++ b/src/www/snippet/add_snippet_to_package.php
@@ -4,6 +4,7 @@
  *
  * Copyright 1999-2001 (c) VA Linux Systems
  * Copyright (C) 2010 Alain Peyrat - Alcatel-Lucent
+ * Copyright 2014, Franck Villaume - TrivialDev
  * http://fusionforge.org
  *
  * This file is part of FusionForge. FusionForge is free software;
@@ -26,6 +27,7 @@ require_once '../env.inc.php';
 require_once $gfcommon.'include/pre.php';
 require_once $gfwww.'snippet/snippet_utils.php';
 
+global $HTML;
 $suppress_nav = getStringFromRequest('suppress_nav');
 
 function handle_add_exit() {
@@ -52,7 +54,7 @@ if (session_loggedin()) {
 
 	if (!$snippet_package_version_id) {
 		//make sure the package id was passed in
-		echo '<p class="error">' ._('Error: snippet_package_version_id missing') .'</p>';
+		echo $HTML->error_msg(_('Error: snippet_package_version_id missing'));
 		handle_add_exit();
 	}
 
@@ -69,7 +71,7 @@ if (session_loggedin()) {
 						"snippet_package_version_id=$2",
 						array(user_getid(), $snippet_package_version_id));
 			if (!$result || db_numrows($result) < 1) {
-				echo '<p class="error">' ._('Error: Only the creator of a package version can add snippets to it.').'</p>';
+				echo $HTML->error_msg(_('Error: Only the creator of a package version can add snippets to it.'));
 				handle_add_exit();
 			}
 
@@ -79,7 +81,7 @@ if (session_loggedin()) {
 			$result=db_query_params('SELECT * FROM snippet_version WHERE snippet_version_id=$1',
 						array($snippet_version_id));
 			if (!$result || db_numrows($result) < 1) {
-				echo '<p class="error">' ._('Error: snippet does not exist').'</p>';
+				echo $HTML->error_msg(_('Error: snippet does not exist'));
 				echo util_make_link ('/snippet/add_snippet_to_package.php?snippet_package_version_id='.$snippet_package_version_id,_('Back To Add Page'));
 				handle_add_exit();
 			}
@@ -93,7 +95,7 @@ if (session_loggedin()) {
 						array($snippet_package_version_id,
 							$snippet_version_id));
 			if ($result && db_numrows($result) > 0) {
-				echo '<p class="error">'._('Error: That snippet was already added to this package.').'</p>';
+				echo $HTML->error_msg(_('Error: That snippet was already added to this package.'));
 				echo util_make_link ('/snippet/add_snippet_to_package.php?snippet_package_version_id='.$snippet_package_version_id,_('Back To Add Page'));
 				handle_add_exit();
 			}
@@ -110,7 +112,7 @@ if (session_loggedin()) {
 				$feedback .= _('Snippet Version Added Successfully.');
 			}
 		} else {
-			echo '<p class="error">' ._('Error: Go back and fill in all the information').'</p>';
+			echo $HTML->error_msg(_('Error: Go back and fill in all the information'));
 			echo util_make_link ('/snippet/add_snippet_to_package.php?snippet_package_version_id='.$snippet_package_version_id,_('Back To Add Page'));
 			handle_add_exit();
 		}
@@ -159,7 +161,6 @@ for ($i=0; $i<$combolistrows; $i++)
 ?>
 </select>
 	</td></tr>
-
 	<tr><td colspan="2" class="align-center">
 		<strong><?php echo _('Make sure all info is complete and accurate'); ?></strong>
 		<br />
@@ -179,14 +180,13 @@ for ($i=0; $i<$combolistrows; $i++)
 	$rows=db_numrows($result);
 	if (!$result || $rows < 1) {
 		echo db_error();
-		echo '
-		<p class="information" >' ._('No Snippets Are In This Package Yet').'</p>';
+		echo $HTML->information(_('No Snippets Are In This Package Yet'));
 	} else {
 		echo $HTML->boxTop(_('Snippets In This Package'));
 		echo $HTML->listTableTop();
 		for ($i=0; $i<$rows; $i++) {
 			echo '
-			<tr '. $GLOBALS['HTML']->boxGetAltRowStyle($i) .'><td class="align-center">
+			<tr '. $HTML->boxGetAltRowStyle($i) .'><td class="align-center">
 				<a href="'.util_make_url ('/snippet/delete.php?type=frompackage&snippet_version_id='.db_result($result,$i,'snippet_version_id').'&snippet_package_version_id='.$snippet_package_version_id).
 				'">' . html_image("ic/trash.png","16","16") . '</a></td><td style="width:99%">'.
 				db_result($result,$i,'name').' '.db_result($result,$i,'version')."</td></tr>";
@@ -196,11 +196,7 @@ for ($i=0; $i<$combolistrows; $i++)
 		echo $HTML->listTableBottom();
 		echo $HTML->boxBottom();
 	}
-
 	handle_add_exit();
-
 } else {
-
 	exit_not_logged_in();
-
 }

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

Summary of changes:
 .../view/admin/viewGlobalConfiguration.php         |    8 +++----
 .../view/admin/viewProjectConfiguration.php        |    4 ++--
 .../phpcaptcha/common/phpcaptchaPlugin.class.php   |    7 ++++---
 .../projects-hierarchy/view/admin_project_link.php |    4 ++--
 .../common/scmgit_Widget_MyRepositories.class.php  |   17 ++++++++-------
 src/plugins/scmhook/common/scmhookPlugin.class.php |    8 +++----
 src/www/snippet/add_snippet_to_package.php         |   22 ++++++++------------
 7 files changed, 35 insertions(+), 35 deletions(-)


hooks/post-receive
-- 
FusionForge



More information about the Fusionforge-commits mailing list