[Fusionforge-commits] r9262 - trunk/gforge/common/include

Christian Bayle cbayle at libremir.placard.fr.eu.org
Mon Mar 29 10:00:28 CEST 2010


Author: cbayle
Date: 2010-03-29 10:00:28 +0200 (Mon, 29 Mar 2010)
New Revision: 9262

Modified:
   trunk/gforge/common/include/Plugin.class.php
Log:
Add a _addHook function to provide compat with codendi plugins
this should be used instead of $this->hooks[] =


Modified: trunk/gforge/common/include/Plugin.class.php
===================================================================
--- trunk/gforge/common/include/Plugin.class.php	2010-03-28 20:25:40 UTC (rev 9261)
+++ trunk/gforge/common/include/Plugin.class.php	2010-03-29 08:00:28 UTC (rev 9262)
@@ -20,6 +20,9 @@
  * along with FusionForge; if not, write to the Free Software
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
  * USA
+ *
+ * Portions Copyright (c) Xerox Corporation, Codendi Team, 2001-2009. All rights reserved
+ * Portions Copyright 2010 (c) Mélanie Le Bail
  */
 
 class Plugin extends Error {
@@ -30,7 +33,7 @@
 	 * Plugin() - constructor
 	 *
 	 */
-	function Plugin () {
+	function Plugin ($id=0) {
 		$this->Error() ;
 		$this->name = false ;
 		$this->hooks = array () ;
@@ -44,6 +47,12 @@
 	function GetHooks () {
 		return $this->hooks ;
 	}
+	/**
+	 * _addHooks() - add a hook to the list of hooks
+	 */
+	function _addHook ($name) {
+		return $this->hooks[]=$name ;
+	}
 
 	/**
 	 * GetName() - get plugin name




More information about the Fusionforge-commits mailing list