From 8f3634c3e357e7a324ef9d28d181fceb275afbf5 Mon Sep 17 00:00:00 2001 From: hickert Date: Mon, 18 Aug 2008 06:20:43 +0000 Subject: [PATCH] Update plugin class -Added debug output for post handling. Requires debug level 8. git-svn-id: https://oss.gonicus.de/repositories/gosa/branches/2.5@12223 594d385d-05f5-0310-b6e9-bd551577e9d8 --- include/class_plugin.inc | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/include/class_plugin.inc b/include/class_plugin.inc index f4dd40ef6..a17378c87 100644 --- a/include/class_plugin.inc +++ b/include/class_plugin.inc @@ -561,8 +561,11 @@ class plugin if (check_command($command)){ @DEBUG (DEBUG_SHELL, __LINE__, __FUNCTION__, __FILE__, $command, "Execute"); - - exec($command); + exec($command,&$arr); + foreach($arr as $str){ + @DEBUG (DEBUG_SHELL, __LINE__, __FUNCTION__, __FILE__, + $command, "Result: ".$str); + } } else { $message= sprintf(_("Command '%s', specified as POSTCREATE for plugin '%s' doesn't seem to exist."), $command, get_class($this)); print_red ($message); @@ -597,7 +600,11 @@ class plugin @DEBUG (DEBUG_SHELL, __LINE__, __FUNCTION__, __FILE__, $command, "Execute"); - exec($command); + exec($command,&$arr); + foreach($arr as $str){ + @DEBUG (DEBUG_SHELL, __LINE__, __FUNCTION__, __FILE__, + $command, "Result: ".$str); + } } else { $message= sprintf(_("Command '%s', specified as POSTMODIFY for plugin '%s' doesn't seem to exist."), $command, get_class($this)); print_red ($message); @@ -632,7 +639,11 @@ class plugin @DEBUG (DEBUG_SHELL, __LINE__, __FUNCTION__, __FILE__, $command, "Execute"); - exec($command); + exec($command,&$arr); + foreach($arr as $str){ + @DEBUG (DEBUG_SHELL, __LINE__, __FUNCTION__, __FILE__, + $command, "Result: ".$str); + } } else { $message= sprintf(_("Command '%s', specified as POSTREMOVE for plugin '%s' doesn't seem to exist."), $command, get_class($this)); print_red ($message); -- 2.30.2