From 185d74da9bd7b64a5144869f9c38a8b40d4ce5ab Mon Sep 17 00:00:00 2001 From: hickert Date: Mon, 18 Aug 2008 06:22:09 +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/trunk@12224 594d385d-05f5-0310-b6e9-bd551577e9d8 --- gosa-core/include/class_plugin.inc | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/gosa-core/include/class_plugin.inc b/gosa-core/include/class_plugin.inc index 8c8ca1dca..2adbf492f 100644 --- a/gosa-core/include/class_plugin.inc +++ b/gosa-core/include/class_plugin.inc @@ -636,8 +636,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= msgPool::cmdnotfound("POSTCREATE", get_class($this)); msg_dialog::display(_("Error"), $message, ERROR_DIALOG); @@ -674,7 +677,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= msgPool::cmdnotfound("POSTMODIFY", get_class($this)); msg_dialog::display(_("Error"), $message, ERROR_DIALOG); @@ -712,7 +719,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= msgPool::cmdnotfound("POSTREMOVE", get_class($this)); msg_dialog::display(_("Error"), $message, ERROR_DIALOG); -- 2.30.2