Code

Updated opsi
[gosa.git] / gosa-core / include / class_plugin.inc
index 8c8ca1dcaed1533ea654cbc96228191d6e7ceb3a..31d5b4bafd80e2c155c2852626394c08e60b80f1 100644 (file)
@@ -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);