From 874db234fa0a36e552c536eb7cc116944b37ba5c Mon Sep 17 00:00:00 2001 From: Christian Bayle Date: Mon, 29 Mar 2010 08:00:28 +0000 Subject: [PATCH] Add a _addHook function to provide compat with codendi plugins this should be used instead of $this->hooks[] = --- gforge/common/include/Plugin.class.php | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/gforge/common/include/Plugin.class.php b/gforge/common/include/Plugin.class.php index fd32452bca..5110ab9fef 100644 --- a/gforge/common/include/Plugin.class.php +++ b/gforge/common/include/Plugin.class.php @@ -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 @@ class Plugin extends Error { * Plugin() - constructor * */ - function Plugin () { + function Plugin ($id=0) { $this->Error() ; $this->name = false ; $this->hooks = array () ; @@ -44,6 +47,12 @@ class Plugin extends Error { 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 -- 2.30.2