Code

Added functions_FAI.inc to main.inc
[gosa.git] / include / class_tabs.inc
index cda88a02cff2fcb2f5cfbd0826ec8ebd27cc6876..e0e8dbe422b0bf555c7fe25940a04bdf3b5aa0bf 100644 (file)
@@ -175,6 +175,15 @@ class tabs
 
   function delete()
   {
+       /* Check if all plugins will ACK for deletion */
+       foreach (array_reverse($this->by_object) as $key => $obj){
+               $reason= $obj->allow_remove();
+               if ($reason != ""){
+                       print_red(sprintf(_("Delete process has been canceled by plugin '%s': %s"), $key, $reason));
+                       return;
+               }
+       }
+
        /* Delete for all plugins */
        foreach (array_reverse($this->by_object) as $key => $obj){
                $obj->remove_from_parent();
@@ -272,7 +281,7 @@ class tabs
                                  $this->SubDialog = true;
                      return($tmp['string']);
                  }else{
-                 $ret .= "<br>".$tmp['string'];
+                 $ret .= $tmp['string'];
                          }
                  }
          }