[Fusionforge-commits] FusionForge branch master updated. 062c44c8a91d59d305a0d20c3b6b72ee6186d958

Sylvain Beucler beuc-inria at fusionforge.org
Fri Jul 11 11:53:08 CEST 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  062c44c8a91d59d305a0d20c3b6b72ee6186d958 (commit)
      from  67525202d594762b57d28cd11fdfac1ed757cbda (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 062c44c8a91d59d305a0d20c3b6b72ee6186d958
Author: Sylvain Beucler <sylvain.beucler at inria.fr>
Date:   Fri Jul 11 11:53:02 2014 +0200

    scmhook: don't attempt to valide params when scmhook or specific hook is not activated

diff --git a/src/plugins/scmhook/common/scmhookPlugin.class.php b/src/plugins/scmhook/common/scmhookPlugin.class.php
index 8af436d..38b37b4 100644
--- a/src/plugins/scmhook/common/scmhookPlugin.class.php
+++ b/src/plugins/scmhook/common/scmhookPlugin.class.php
@@ -105,6 +105,11 @@ class scmhookPlugin extends Plugin {
 
 	function update($params) {
 		$group_id = $params['group_id'];
+
+                $group = group_get_object($group_id);
+                if (!$group->usesPlugin($this->name))
+                    return;
+
 		$hooksString = '';
 		$hooks = $this->getAvailableHooks($group_id);
 		$available_hooknames = array();
@@ -128,6 +133,8 @@ class scmhookPlugin extends Plugin {
 			$hook_params = $hook->getParams();
 			if (count($hook_params) == 0)
 				continue;
+                        if (!array_search($hook->getClassname(), $enabled_hooknames))
+                                continue;
 			// Build 3 arrays for inconvenient db_query_params()
 			$i = 1;
 			$sql_cols = array_keys($hook_params);

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

Summary of changes:
 src/plugins/scmhook/common/scmhookPlugin.class.php |    7 +++++++
 1 file changed, 7 insertions(+)


hooks/post-receive
-- 
FusionForge



More information about the Fusionforge-commits mailing list