gforge-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Gforge-commits] gforge/common/include PluginManager.class, 1.12, 1.13


From: gsmet
Subject: [Gforge-commits] gforge/common/include PluginManager.class, 1.12, 1.13
Date: Sun, 12 Dec 2004 17:31:17 -0600

Update of /cvsroot/gforge/gforge/common/include
In directory db.perdue.net:/tmp/cvs-serv18374/common/include

Modified Files:
        PluginManager.class 
Log Message:
added plugin_hook_by_reference (we cannot pass false by reference for example 
so I had to add a new function)

Index: PluginManager.class
===================================================================
RCS file: /cvsroot/gforge/gforge/common/include/PluginManager.class,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -d -r1.12 -r1.13
--- PluginManager.class 27 Oct 2004 21:40:17 -0000      1.12
+++ PluginManager.class 12 Dec 2004 23:31:14 -0000      1.13
@@ -142,7 +142,7 @@
         * @param hookname - name of the hook
         * @param params - array of extra parameters
         */
-       function RunHooks ($hookname, $params) {
+       function RunHooks ($hookname, & $params) {
                if (isset($this->hooks_to_plugins[$hookname])) {
                        $p_list = $this->hooks_to_plugins[$hookname];
                        foreach ($p_list as $p_name) {
@@ -209,7 +209,18 @@
  * @param hookname - name of the hook
  * @param params - parameters for the hook
  */
-function plugin_hook ($hookname, $params=false) {
+function plugin_hook ($hookname, $params = false) {
+       $pm =& plugin_manager_get_object () ;
+       return $pm->RunHooks ($hookname, $params) ;
+}
+
+/**
+ * plugin_hook () - run a set of hooks with params passed by reference
+ *
+ * @param hookname - name of the hook
+ * @param params - parameters for the hook
+ */
+function plugin_hook_by_reference ($hookname, & $params) {
        $pm =& plugin_manager_get_object () ;
        return $pm->RunHooks ($hookname, $params) ;
 }





reply via email to

[Prev in Thread] Current Thread [Next in Thread]