From c50934fd793b28bc6a2fd41cf1159954d5de4e43 Mon Sep 17 00:00:00 2001 From: hickert Date: Fri, 16 May 2008 09:51:14 +0000 Subject: [PATCH] Added robustness to tabs::save() git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@10927 594d385d-05f5-0310-b6e9-bd551577e9d8 --- gosa-core/include/class_tabs.inc | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/gosa-core/include/class_tabs.inc b/gosa-core/include/class_tabs.inc index b6fb6b057..3245241a2 100644 --- a/gosa-core/include/class_tabs.inc +++ b/gosa-core/include/class_tabs.inc @@ -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); -- 2.30.2