[Fusionforge-commits] r15834 - in trunk/src: plugins/scmhook/common www/scm/admin

Franck VILLAUME nerville at fusionforge.org
Tue Jun 26 16:54:28 CEST 2012


Author: nerville
Date: 2012-06-26 16:54:28 +0200 (Tue, 26 Jun 2012)
New Revision: 15834

Modified:
   trunk/src/plugins/scmhook/common/scmhookPlugin.class.php
   trunk/src/www/scm/admin/index.php
Log:
add flag to not display information about hooks when no scm type is selected

Modified: trunk/src/plugins/scmhook/common/scmhookPlugin.class.php
===================================================================
--- trunk/src/plugins/scmhook/common/scmhookPlugin.class.php	2012-06-26 14:22:04 UTC (rev 15833)
+++ trunk/src/plugins/scmhook/common/scmhookPlugin.class.php	2012-06-26 14:54:28 UTC (rev 15834)
@@ -39,8 +39,9 @@
 		switch ($hookname) {
 			case "scm_admin_page": {
 				$group_id = $params['group_id'];
+				$scm_plugin = $params['scm_plugin'];
 				$group = &group_get_object($group_id);
-				if ($group->usesPlugin($this->name)) {
+				if ($group->usesPlugin($this->name) && $scm_plugin) {
 					$this->displayScmHook($group_id);
 				}
 				break;

Modified: trunk/src/www/scm/admin/index.php
===================================================================
--- trunk/src/www/scm/admin/index.php	2012-06-26 14:22:04 UTC (rev 15833)
+++ trunk/src/www/scm/admin/index.php	2012-06-26 14:54:28 UTC (rev 15834)
@@ -104,6 +104,7 @@
 		echo '<p class="error_msg">'._('Error - Site has SCM but no plugins registered').'</p>';
 	}
 
+	(isset($scm)) ? $hook_params['scm_plugin'] = $scm : $hook_params['scm_plugin'] = 0;
 	plugin_hook("scm_admin_page", $hook_params);
 ?>
 <input type="hidden" name="group_id" value="<?php echo $group_id; ?>" />




More information about the Fusionforge-commits mailing list