From: hickert Date: Mon, 18 Aug 2008 06:20:43 +0000 (+0000) Subject: Update plugin class X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=8f3634c3e357e7a324ef9d28d181fceb275afbf5;p=gosa.git 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 --- 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);