From: hickert Date: Fri, 16 May 2008 09:51:14 +0000 (+0000) Subject: Added robustness to tabs::save() X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=c50934fd793b28bc6a2fd41cf1159954d5de4e43;p=gosa.git Added robustness to tabs::save() git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@10927 594d385d-05f5-0310-b6e9-bd551577e9d8 --- 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);