From b5715fb4a82d6494e6fba5ffcc1b0af3c9d2421c Mon Sep 17 00:00:00 2001 From: cfoe <cfoe@ispconfig3> Date: Sat, 07 Jul 2012 13:12:41 -0400 Subject: [PATCH] removed hardcoded width for list search_limit select-element -> css defined --- server/lib/classes/services.inc.php | 22 ++++++++++++---------- 1 files changed, 12 insertions(+), 10 deletions(-) diff --git a/server/lib/classes/services.inc.php b/server/lib/classes/services.inc.php index 260d3f0..d10abf2 100644 --- a/server/lib/classes/services.inc.php +++ b/server/lib/classes/services.inc.php @@ -1,6 +1,7 @@ <?php + /* -Copyright (c) 2007, projektfarm Gmbh, Till Brehm, Falko Timme +Copyright (c) 2007, Till Brehm, projektfarm Gmbh All rights reserved. Redistribution and use in source and binary forms, with or without modification, @@ -27,11 +28,11 @@ EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ - class services { var $registered_services = array(); var $delayed_restarts = array(); + var $debug = false; // This function adds a request for restarting // a service at the end of the configuration run. @@ -40,7 +41,7 @@ if(is_array($this->registered_services[$service_name])) { $this->delayed_restarts[$service_name] = $action; } else { - $app->log("Unable to add a delayed restart for '$service_name'. Service '$service_name' is not registered.",LOGLEVEL_WARNING); + $app->log("Unable to add a delayed restart for '$service_name'. Service not registered.",LOGLEVEL_WARNING); } } @@ -50,12 +51,13 @@ global $app; if(is_array($this->registered_services[$service_name])) { - $module_name = $this->registered_services[$service_name]["module"]; - $function_name = $this->registered_services[$service_name]["function"]; - $app->log("Call function '$function_name' in module '$module_name'.",LOGLEVEL_DEBUG); - call_user_method($function_name,$app->loaded_modules[$module_name],$action); + $module_name = $this->registered_services[$service_name]['module']; + $function_name = $this->registered_services[$service_name]['function']; + $app->log("Calling function '$function_name' from module '$module_name'.",LOGLEVEL_DEBUG); + // call_user_method($function_name,$app->loaded_modules[$module_name],$action); + call_user_func(array($app->loaded_modules[$module_name],$function_name),$action); } else { - $app->log("Unable to restart $service_name. Service $service_name is not registered.",LOGLEVEL_WARNING); + $app->log("Unable to restart $service_name. Service not registered.",LOGLEVEL_WARNING); } } @@ -64,7 +66,7 @@ function registerService($service_name,$module_name, $function_name) { global $app; $this->registered_services[$service_name] = array('module' => $module_name, 'function' => $function_name); - $app->log("Registered Service '$service_name' in module '$module_name' for processing function '$function_name'",LOGLEVEL_DEBUG); + if($this->debug) $app->log("Registered Service '$service_name' in module '$module_name' for processing function '$function_name'",LOGLEVEL_DEBUG); } // This function is called at the end of the server script to restart services. @@ -76,4 +78,4 @@ } } -?> \ No newline at end of file +?> -- Gitblit v1.9.1