From 061e9a70ecd62c79b991cd967b11cb3e8ddd78e8 Mon Sep 17 00:00:00 2001
From: tbrehm <t.brehm@ispconfig.org>
Date: Tue, 11 Jan 2011 09:28:12 -0500
Subject: [PATCH] Replaced calls for call_user_method with call_user_func to avoid php deprecated warnings.

---
 interface/lib/classes/plugin.inc.php |   15 ++++++++-------
 1 files changed, 8 insertions(+), 7 deletions(-)

diff --git a/interface/lib/classes/plugin.inc.php b/interface/lib/classes/plugin.inc.php
index 50efb90..450efd0 100644
--- a/interface/lib/classes/plugin.inc.php
+++ b/interface/lib/classes/plugin.inc.php
@@ -63,15 +63,15 @@
 				//** load the plugins
 				foreach($tmp_plugins as $plugin_name => $file) {
 					include_once($plugins_dir.$file);
-					if($this->debug) $app->log("Loading Plugin: $plugin_name",LOGLEVEL_DEBUG);
+					if($this->debug) $app->log('Loading plugin: '.$plugin_name,LOGLEVEL_DEBUG);
 					$app->loaded_plugins[$plugin_name] = new $plugin_name;
 					$app->loaded_plugins[$plugin_name]->onLoad();
 				}
 			} else {
-				$app->log("Unable to open the plugin directory: $plugins_dir",LOGLEVEL_ERROR);
+				$app->log('Unable to open the plugins directory: '.$plugins_dir,LOGLEVEL_ERROR);
 			}
 		} else {
-			$app->log("Plugin directory missing: $plugins_dir",LOGLEVEL_ERROR);
+			$app->log('Plugins directory missing: '.$plugins_dir,LOGLEVEL_ERROR);
 		}
 		
 	}
@@ -98,7 +98,7 @@
 		
 		if(!isset($_SESSION['s']['plugin_cache'])) {
 			$this->loadPluginCache();
-			if($this->debug) $app->log("Loaded the plugin cache.",LOGLEVEL_DEBUG);
+			if($this->debug) $app->log('Loaded the plugin cache.',LOGLEVEL_DEBUG);
 		}
 		
 		
@@ -131,7 +131,7 @@
 		}
 		
 	 } // end function raiseEvent
-	 
+	
 	 //* Internal function to load the plugin and call the event function in the plugin.
 	 private function callPluginEvent($event_name,$data) {
 	 	global $app;
@@ -148,7 +148,8 @@
 						$app->loaded_plugins[$plugin_name] = new $plugin_name;
 					}
 					if($this->debug) $app->log("Called method: '$function_name' in plugin '$plugin_name' for event '$event_name'",LOGLEVEL_DEBUG);
-					call_user_method($function_name,$app->loaded_plugins[$plugin_name],$event_name,$data);
+					// call_user_method($function_name,$app->loaded_plugins[$plugin_name],$event_name,$data);
+					call_user_func(array($app->loaded_plugins[$plugin_name],$function_name),$event_name,$data);
 				}
 			}
 			
@@ -158,4 +159,4 @@
 	
 }
 
-?>
\ No newline at end of file
+?>

--
Gitblit v1.9.1