From: hickert Date: Tue, 29 Nov 2005 13:20:48 +0000 (+0000) Subject: Prevent automatic remove of phpgwaccount when not in tabbed mode X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=e1c66410bbe8e3c16f7ad6c0be908d102538472c;p=gosa.git Prevent automatic remove of phpgwaccount when not in tabbed mode git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@2132 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/plugins/personal/connectivity/class_phpgwAccount.inc b/plugins/personal/connectivity/class_phpgwAccount.inc index b4d8df5fa..aa38d1878 100644 --- a/plugins/personal/connectivity/class_phpgwAccount.inc +++ b/plugins/personal/connectivity/class_phpgwAccount.inc @@ -61,22 +61,24 @@ class phpgwAccount extends plugin function remove_from_parent() { - /* Cancel if there's nothing to do here */ - if (!$this->initially_was_account){ - return; + if ($this->parent != NULL){ + /* Cancel if there's nothing to do here */ + if (!$this->initially_was_account){ + return; + } + + plugin::remove_from_parent(); + $ldap= $this->config->get_ldap_link(); + + $ldap->cd($this->dn); + @DEBUG (DEBUG_LDAP, __LINE__, __FUNCTION__, __FILE__, + $this->attributes, "Save"); + $ldap->modify($this->attrs); + show_ldap_error($ldap->get_error()); + + /* Optionally execute a command after we're done */ + $this->handle_post_events('remove'); } - - plugin::remove_from_parent(); - $ldap= $this->config->get_ldap_link(); - - $ldap->cd($this->dn); - @DEBUG (DEBUG_LDAP, __LINE__, __FUNCTION__, __FILE__, - $this->attributes, "Save"); - $ldap->modify($this->attrs); - show_ldap_error($ldap->get_error()); - - /* Optionally execute a command after we're done */ - $this->handle_post_events('remove'); }