[Fusionforge-commits] r8878 - in trunk/gforge: common/include plugins/webcalendar/common

Christian Bayle cbayle at libremir.placard.fr.eu.org
Fri Feb 26 11:55:15 CET 2010


Author: cbayle
Date: 2010-02-26 11:55:15 +0100 (Fri, 26 Feb 2010)
New Revision: 8878

Modified:
   trunk/gforge/common/include/Group.class.php
   trunk/gforge/plugins/webcalendar/common/webcalendarPlugin.class.php
Log:
Make hook not specific to a plugin


Modified: trunk/gforge/common/include/Group.class.php
===================================================================
--- trunk/gforge/common/include/Group.class.php	2010-02-26 10:19:46 UTC (rev 8877)
+++ trunk/gforge/common/include/Group.class.php	2010-02-26 10:55:15 UTC (rev 8878)
@@ -2180,12 +2180,13 @@
 		$this->sendApprovalEmail();
 		$this->addHistory('Approved', 'x');
 		
-		//plugin webcal
-		//change assistant for webcal
-			
+		// 
+		//	Plugin can make approve operation there
+		//
+		//	
 		$params[0] = $idadmin_group ;
 		$params[1] = $this->getID();
-		plugin_hook('change_cal_permission_default',$params);	
+		plugin_hook('group_approve',$params);	
 
 		return true;
 	}

Modified: trunk/gforge/plugins/webcalendar/common/webcalendarPlugin.class.php
===================================================================
--- trunk/gforge/plugins/webcalendar/common/webcalendarPlugin.class.php	2010-02-26 10:19:46 UTC (rev 8877)
+++ trunk/gforge/plugins/webcalendar/common/webcalendarPlugin.class.php	2010-02-26 10:55:15 UTC (rev 8878)
@@ -43,7 +43,7 @@
 		$this->hooks[] = "add_cal_group"; //add a group user in calendar base
 		$this->hooks[] = "del_cal_group"; //del a gforge user in calendar base
 		$this->hooks[] = "change_cal_permission"; //change permission pour webcal user (admin or not)
-		$this->hooks[] = "change_cal_permission_default"; //change permission pour webcal user (admin or not)
+		$this->hooks[] = "group_approve"; //change permission pour webcal user (admin or not)
 		$this->hooks[] = "change_cal_permission_auto"; //change permission pour webcal user when you modify role
 		$this->hooks[] = "add_cal_link_father"; // add a link between son and father
 		$this->hooks[] = "del_cal_link_father"; // del a link between son and father
@@ -307,7 +307,7 @@
 				$row_nom_boss['unix_group_name']));
 				}
 		}
-		elseif ($hookname == "change_cal_permission_default") {
+		elseif ($hookname == "group_approve") {
 			$res = db_query_params ('SELECT admin_flags FROM user_group WHERE user_id = $1 AND group_id = $2',
 						array ($params[0],
 						       $params[1]));




More information about the Fusionforge-commits mailing list