Code

Added fall back to old style move method.
[gosa.git] / gosa-core / include / class_tabs.inc
index b6fb6b057ffa813a55f5993d3cf918a22637f026..3245241a2ae241e11a07ff86d3e5ebb186b64dec 100644 (file)
@@ -302,12 +302,17 @@ class tabs
 
       $obj->dn= $this->dn;
 
-      if ($obj->is_account || $ignore_account || $obj->ignore_account){
-        if ($obj->save() == 1){
-          return (1);
+      if(!$obj instanceof plugin){
+        trigger_error("Something went wrong while saving ".$obj->dn.". Object class '".get_class($obj)."'.");
+      }else{
+
+        if ($obj->is_account || $ignore_account || $obj->ignore_account){
+          if ($obj->save() == 1){
+            return (1);
+          }
+        } else {
+          $obj->remove_from_parent();
         }
-      } else {
-        $obj->remove_from_parent();
       }
     }
     return (0);