From 3fc28c0142bf8ab4e2cfae44931e2a51aadc4d51 Mon Sep 17 00:00:00 2001
From: mcramer <m.cramer@pixcept.de>
Date: Mon, 25 Feb 2013 13:51:37 -0500
Subject: [PATCH] - Added: remoting queries with a lot of results (e.g. email addresses or alias domains or dns rr) lead to non-functioning soap requests - added '#OFFSET#' AND '#LIMIT#' handling to the query - added automatic 'WHERE 1' if an empty array was given as query example: $result = $api->sites_web_domain_get('type' => 'vhost', '#OFFSET#' => 25, '#LIMIT#' => 50); to get the websites 26 to 75
---
interface/lib/classes/plugin.inc.php | 13 +++++++++----
1 files changed, 9 insertions(+), 4 deletions(-)
diff --git a/interface/lib/classes/plugin.inc.php b/interface/lib/classes/plugin.inc.php
index 450efd0..341b186 100644
--- a/interface/lib/classes/plugin.inc.php
+++ b/interface/lib/classes/plugin.inc.php
@@ -31,7 +31,7 @@
class plugin {
private $subscribed_events = array();
- private $debug = true;
+ private $debug = false;
/*
@@ -86,7 +86,6 @@
$_SESSION['s']['plugin_cache'][$event_name][] = array('plugin' => $plugin_name, 'function' => $function_name);
if($this->debug) $app->log("Plugin '$plugin_name' has registered the function '$function_name' for the event '$event_name'",LOGLEVEL_DEBUG);
-
}
/*
@@ -135,25 +134,31 @@
//* Internal function to load the plugin and call the event function in the plugin.
private function callPluginEvent($event_name,$data) {
global $app;
-
+
//* execute the functions for the events
- if(is_array($_SESSION['s']['plugin_cache'][$event_name])) {
+ if(@is_array($_SESSION['s']['plugin_cache'][$event_name])) {
foreach($_SESSION['s']['plugin_cache'][$event_name] as $rec) {
$plugin_name = $rec['plugin'];
$function_name = $rec['function'];
$plugin_file = ISPC_LIB_PATH.FS_DIV.'plugins'.FS_DIV.$plugin_name.'.inc.php';
+
+
if(is_file($plugin_file)) {
if(!isset($app->loaded_plugins[$plugin_name])) {
include_once($plugin_file);
$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_func(array($app->loaded_plugins[$plugin_name],$function_name),$event_name,$data);
+
}
}
}
+
} // end functiom callPluginEvent
--
Gitblit v1.9.1