[Fusionforge-commits] FusionForge branch master updated. 840703fe2204e9672383590b601d0424ce3da08c

Franck Villaume nerville at fusionforge.org
Mon Dec 22 14:35:12 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  840703fe2204e9672383590b601d0424ce3da08c (commit)
       via  c0a8f05fb2d736ec02f621c6b6a369cc8e26a0ee (commit)
       via  d4fe3c05cbb33a7d325d8f77abe29a71efb91be3 (commit)
       via  ce95e81d235715ee230d1244c93fa75b2d2c1e78 (commit)
      from  9fd99fb97e7b3fd824998c532e76e4f5d5f9b421 (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 840703fe2204e9672383590b601d0424ce3da08c
Author: Franck Villaume <franck.villaume at trivialdev.com>
Date:   Mon Dec 22 14:33:56 2014 +0100

    plugin description: avoid useless function. reuse pkg_desc

diff --git a/src/common/include/Plugin.class.php b/src/common/include/Plugin.class.php
index faaff02..1564e11 100644
--- a/src/common/include/Plugin.class.php
+++ b/src/common/include/Plugin.class.php
@@ -7,7 +7,7 @@
  * Copyright 2001-2009, Xerox Corporation, Codendi Team
  * Copyright 2010, Mélanie Le Bail
  * Copyright 2011, Alain Peyrat - Alcatel-Lucent
- * Copyright 2013, Franck Villaume - TrivialDev
+ * Copyright 2013,2014 Franck Villaume - TrivialDev
  * http://fusionforge.org
  *
  * This file is part of FusionForge. FusionForge is free software;
@@ -34,6 +34,7 @@ class Plugin extends Error {
 	var $name;
 	var $hooks;
 	var $id = NULL;
+	var $pkg_desc = 'No description available.';
 
 	/**
 	 * Plugin() - constructor
@@ -271,12 +272,7 @@ class Plugin extends Error {
 			}
 			echo ' /><br/>';
 			echo "</td>\n";
-			$pluginObject = plugin_get_object($this->name);
-			if (method_exists($pluginObject, 'getPluginDescription')) {
-				echo '<td title="'.$description = $pluginObject->getPluginDescription().'">';
-			} else {
-				echo "</td>\n";
-			}
+			echo '<td title="'.$this->pkg_desc.'">';
 			echo "<strong>";
 			printf(_("Use %s"), $this->text);
 			echo "</strong>";
@@ -346,7 +342,7 @@ class Plugin extends Error {
 	}
 
 	function getPluginDescription() {
-		return _('No description available.');
+		return $this->pkg_desc;
 	}
 }
 
diff --git a/src/plugins/headermenu/common/headermenuPlugin.class.php b/src/plugins/headermenu/common/headermenuPlugin.class.php
index e2bc728..5daab1c 100644
--- a/src/plugins/headermenu/common/headermenuPlugin.class.php
+++ b/src/plugins/headermenu/common/headermenuPlugin.class.php
@@ -32,7 +32,8 @@ class headermenuPlugin extends Plugin {
 		$this->text = _('Menu Tabs Manager');
 		$this->pkg_desc =
 _("This plugin allows each project to define extra tabs with arbitrary
-titles and links.");
+titles and links, next to the login menu (headermenu),
+in the main menu (outermenu) or in the project menu (groupmenu).");
 		$this->_addHook('headermenu');
 		$this->_addHook('site_admin_option_hook');
 		$this->_addHook('outermenu');
@@ -465,13 +466,4 @@ titles and links.");
 		include $gfplugins.$this->name.'/view/admin/viewProjectConfiguration.php';
 		return true;
 	}
-
-	/**
-	 * getPluginDescription - display the description of this plugin in pluginman admin page
-	 *
-	 * @return	string	the description
-	 */
-	function getPluginDescription() {
-		return _('Get the ability to set new links next to the login menu (headermenu), in the main menu (outermenu) or in the project menu (groupmenu).');
-	}
 }
diff --git a/src/plugins/mantisbt/common/MantisBTPlugin.class.php b/src/plugins/mantisbt/common/MantisBTPlugin.class.php
index bb5f216..be90977 100644
--- a/src/plugins/mantisbt/common/MantisBTPlugin.class.php
+++ b/src/plugins/mantisbt/common/MantisBTPlugin.class.php
@@ -29,6 +29,8 @@ class MantisBTPlugin extends Plugin {
 		$this->Plugin();
 		$this->name = 'mantisbt';
 		$this->text = 'MantisBT'; // To show in the tabs, use...
+		$this->pkg_desc =
+_('Use Mantis Bugtracker as another ticket management tool.');
 		$this->_addHook('user_personal_links'); //to make a link to the user's personal part of the plugin
 		$this->_addHook('usermenu');
 		$this->_addHook('groupmenu'); // To put into the project tabs
@@ -687,16 +689,6 @@ class MantisBTPlugin extends Plugin {
 		return util_make_link('/plugins/'.$this->name.'/?type=globaladmin', _('Global MantisBT admin'), array('title' => _('Direct link to global configuration of this plugin')));
 	}
 
-
-	/**
-	 * getPluginDescription - display the description of this plugin in pluginman admin page
-	 *
-	 * @return	string	the description
-	 */
-	function getPluginDescription() {
-		return _('Use Mantis Bugtracker as another ticket management tool.');
-	}
-
 	/** Widgets function **/
 
 	function widgets($params) {
diff --git a/src/plugins/scmhg/common/HgPlugin.class.php b/src/plugins/scmhg/common/HgPlugin.class.php
index a69159c..3c626c7 100644
--- a/src/plugins/scmhg/common/HgPlugin.class.php
+++ b/src/plugins/scmhg/common/HgPlugin.class.php
@@ -36,7 +36,8 @@ class HgPlugin extends SCMPlugin {
 		$this->pkg_desc =
 _("This plugin contains the Mercurial (Hg) subsystem of FusionForge. It
 allows each FusionForge project to have its own Mercurial repository,
-and gives some control over it to the project's administrator.");
+and gives some control over it to the project's administrator.
+Offer DAV or SSH access.");
 		$this->_addHook('scm_browser_page');
 		$this->_addHook('scm_update_repolist');
 		$this->_addHook('scm_generate_snapshots');
@@ -48,15 +49,6 @@ and gives some control over it to the project's administrator.");
 		$this->register();
 	}
 
-	/**
-	 * getPluginDescription - display the description of this plugin in pluginman admin page
-	 *
-	 * @return	string	the description
-	 */
-	function getPluginDescription() {
-		return _('Use Mercurial as Source Code Management tool. Offer DAV or SSH access.');
-	}
-
 	function getDefaultServer() {
 		return forge_get_config('default_server', 'scmhg');
 	}
diff --git a/src/plugins/webanalytics/common/webanalyticsPlugin.class.php b/src/plugins/webanalytics/common/webanalyticsPlugin.class.php
index da0259b..50205d4 100644
--- a/src/plugins/webanalytics/common/webanalyticsPlugin.class.php
+++ b/src/plugins/webanalytics/common/webanalyticsPlugin.class.php
@@ -29,7 +29,9 @@ class webanalyticsPlugin extends Plugin {
 		$this->name = "webanalytics" ;
 		$this->text = _("webanalytics") ;
 		$this->pkg_desc =
-_("webanalytics plugin for FusionForge.");
+_("webanalytics plugin for FusionForge. Get the ability
+to configure specific URL for web analytics tool
+such as Piwik or Google Analytics.");
 		$this->_addHook('webanalytics_url');
 		$this->_addHook('webanalytics_admin');
 		$this->_addHook('site_admin_option_hook');
@@ -179,13 +181,4 @@ _("webanalytics plugin for FusionForge.");
 		include $gfplugins.$this->name.'/view/admin/viewGlobalConfiguration.php';
 		return true;
 	}
-
-	/**
-	 * getPluginDescription - display the description of this plugin in pluginman admin page
-	 *
-	 * @return	string	the description
-	 */
-	function getPluginDescription() {
-		return _('Get the ability to configure specific URL for web analytics tool such as Piwik or Google Analytics.');
-	}
 }
diff --git a/src/www/admin/pluginman.php b/src/www/admin/pluginman.php
index b13d317..5371d01 100644
--- a/src/www/admin/pluginman.php
+++ b/src/www/admin/pluginman.php
@@ -264,21 +264,16 @@ foreach ($filelist as $filename) {
 		$groups = _('None');
 		$adminlink = '';
 	}
-	$description = '';
-	if (method_exists($pluginObject, 'getPluginDescription')) {
-		$description = $pluginObject->getPluginDescription();
-	}
-	// Disable link to action if action is not possible.
-	if (isset($action[$filename][$next]) && $action[$filename][$next] === false) {
-		$link = '';
-	}
-
 	// Disable link to action if action is not possible.
 	if (isset($action[$filename][$next]) && $action[$filename][$next] === false) {
 		$link = '';
 	}
 
 	$title = _('Current plugin status is'). ' ' .forge_get_config('plugin_status', $filename);
+	$description = '';
+	if (isset($pluginObject->pkg_desc)) {
+		$description = $pluginObject->pkg_desc;
+	}
 	echo '<tr '. $HTML->boxGetAltRowStyle($j+1) .'>'.
 		'<td title="'. $description.' '.$title .'">'. $filename.'</td>'.
 		'<td class="'.$status.'" class="align-center">'. $msg .'</td>'.

commit c0a8f05fb2d736ec02f621c6b6a369cc8e26a0ee
Author: Franck Villaume <franck.villaume at trivialdev.com>
Date:   Mon Dec 22 12:16:08 2014 +0100

    fix php syntax

diff --git a/src/plugins/headermenu/common/headermenuPlugin.class.php b/src/plugins/headermenu/common/headermenuPlugin.class.php
index ceba933..e2bc728 100644
--- a/src/plugins/headermenu/common/headermenuPlugin.class.php
+++ b/src/plugins/headermenu/common/headermenuPlugin.class.php
@@ -66,7 +66,7 @@ titles and links.");
 				$group_id = $params['group_id'];
 				$project = group_get_object($group_id);
 				if ($project->usesPlugin($this->name)) {
-					echo hmtl_e('p', array(), util_make_link('/plugins/'.$this->name.'/?type=projectadmin&group_id='.$group_id,
+					echo html_e('p', array(), util_make_link('/plugins/'.$this->name.'/?type=projectadmin&group_id='.$group_id,
 					     _('Menu Tabs Manager Admin'), array('title' => _('Add/Remove/Activate/Desactivate tabs'))));
 				}
 				break;

commit d4fe3c05cbb33a7d325d8f77abe29a71efb91be3
Author: Franck Villaume <franck.villaume at trivialdev.com>
Date:   Mon Dec 22 12:15:13 2014 +0100

    scmhook: do not display if use_scm is set to no

diff --git a/src/plugins/scmhook/common/scmhookPlugin.class.php b/src/plugins/scmhook/common/scmhookPlugin.class.php
index f0d7a84..852e5ad 100644
--- a/src/plugins/scmhook/common/scmhookPlugin.class.php
+++ b/src/plugins/scmhook/common/scmhookPlugin.class.php
@@ -33,7 +33,9 @@ _("This plugin contains a set of commit hooks (e-mail notifications,
 tracker integration, conformity...) that can be enabled for each
 project independently.");
 		$this->_addHook('groupmenu');	// To put into the project tabs
-		$this->_addHook('groupisactivecheckbox'); // The "use ..." checkbox in editgroupinfo
+		if (forge_get_config('use_scm')) {
+			$this->_addHook('groupisactivecheckbox'); // The "use ..." checkbox in editgroupinfo
+		}
 		$this->_addHook('groupisactivecheckboxpost'); //
 		$this->_addHook('scm_admin_page');
 		$this->_addHook('scm_admin_update');
@@ -306,7 +308,6 @@ project independently.");
 		return true;
 	}
 
-
 	function displayScmSvnHook($hooksAvailable, $statusDeploy, $hooksEnabled, $group_id) {
 		global $HTML;
 		// Group available hooks by type
diff --git a/src/www/admin/pluginman.php b/src/www/admin/pluginman.php
index 4fd8cb0..b13d317 100644
--- a/src/www/admin/pluginman.php
+++ b/src/www/admin/pluginman.php
@@ -37,7 +37,7 @@ $plugins_disabled = array('scmccase');
 
 // Skip non actionable plugins due to general configuration
 if (!forge_get_config('use_scm')) {
-	array_push($plugins_disabled, 'scmarch', 'scmbzr', 'scmcpold', 'scmcvs', 'scmdarcs', 'scmgit', 'scmhg', 'scmsvn');
+	array_push($plugins_disabled, 'scmarch', 'scmbzr', 'scmcpold', 'scmcvs', 'scmdarcs', 'scmgit', 'scmhg', 'scmsvn', 'scmhook');
 }
 
 $pm = plugin_manager_get_object();

commit ce95e81d235715ee230d1244c93fa75b2d2c1e78
Author: Franck Villaume <franck.villaume at trivialdev.com>
Date:   Sat Dec 20 18:26:14 2014 +0100

    plugin mantisbt: fix loop on user ticket

diff --git a/src/plugins/mantisbt/view/viewIssues.php b/src/plugins/mantisbt/view/viewIssues.php
index 7cdcc52..1e3ff51 100644
--- a/src/plugins/mantisbt/view/viewIssues.php
+++ b/src/plugins/mantisbt/view/viewIssues.php
@@ -55,8 +55,8 @@ try {
 			foreach ($userMantisBTConf as $userMantisBTConfEntry) {
 				$accountDataArray = array('id' => $userMantisBTConfEntry['mantisbt_userid']);
 				$clientSOAP = new SoapClient($userMantisBTConfEntry['url'].'/api/soap/mantisconnect.php?wsdl', array('trace' => true, 'exceptions' => true));
-				$idsBugAll[] = $clientSOAP->__soapCall('mc_project_get_issues_for_user', array('username' => $userMantisBTConfEntry['user'], 'password' => $userMantisBTConfEntry['password'], 'project_id' => 0, 'filter_type' => 'assigned', 'target_user' => $accountDataArray));
-				$listStatus[] = $clientSOAP->__soapCall('mc_enum_status', array('username' => $userMantisBTConfEntry['user'], 'password' => $userMantisBTConfEntry['password']));
+				$idsBugAll = array_merge($idsBugAll, $clientSOAP->__soapCall('mc_project_get_issues_for_user', array('username' => $userMantisBTConfEntry['user'], 'password' => $userMantisBTConfEntry['password'], 'project_id' => 0, 'filter_type' => 'assigned', 'target_user' => $accountDataArray)));
+				$listStatus = array_merge($listStatus, $clientSOAP->__soapCall('mc_enum_status', array('username' => $userMantisBTConfEntry['user'], 'password' => $userMantisBTConfEntry['password'])));
 			}
 			break;
 		}

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

Summary of changes:
 src/common/include/Plugin.class.php                     |   12 ++++--------
 .../headermenu/common/headermenuPlugin.class.php        |   14 +++-----------
 src/plugins/mantisbt/common/MantisBTPlugin.class.php    |   12 ++----------
 src/plugins/mantisbt/view/viewIssues.php                |    4 ++--
 src/plugins/scmhg/common/HgPlugin.class.php             |   12 ++----------
 src/plugins/scmhook/common/scmhookPlugin.class.php      |    5 +++--
 .../webanalytics/common/webanalyticsPlugin.class.php    |   13 +++----------
 src/www/admin/pluginman.php                             |   15 +++++----------
 8 files changed, 24 insertions(+), 63 deletions(-)


hooks/post-receive
-- 
FusionForge



More information about the Fusionforge-commits mailing list