Code

Prevent automatic remove of phpgwaccount when not in tabbed mode
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Tue, 29 Nov 2005 13:18:32 +0000 (13:18 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Tue, 29 Nov 2005 13:18:32 +0000 (13:18 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@2131 594d385d-05f5-0310-b6e9-bd551577e9d8

plugins/personal/connectivity/class_phpgwAccount.inc

index e119980c928fec6bc7d7868f97abacbe1ff4bb7e..b4d8df5fa28c567bd006d06777ba3bad8c9807f7 100644 (file)
@@ -107,21 +107,22 @@ class phpgwAccount extends plugin
   function save()
   {
     plugin::save();
-
-    /* Write back to ldap */
-    $ldap= $this->config->get_ldap_link();
-    $ldap->cd($this->dn);
-    $ldap->modify($this->attrs);
-    show_ldap_error($ldap->get_error());
-
-    /* Optionally execute a command after we're done */
-    if ($this->initially_was_account == $this->is_account){
-      if ($this->is_modified){
-        $this->handle_post_events("mofify");
+    if ($this->parent != NULL){
+      /* Write back to ldap */
+      $ldap= $this->config->get_ldap_link();
+      $ldap->cd($this->dn);
+      $ldap->modify($this->attrs);
+      show_ldap_error($ldap->get_error());
+
+      /* Optionally execute a command after we're done */
+      if ($this->initially_was_account == $this->is_account){
+        if ($this->is_modified){
+          $this->handle_post_events("mofify");
+        }
+      } else {
+        $this->handle_post_events("add");
+      }
       }
-    } else {
-      $this->handle_post_events("add");
-    }
   }
 
 }