Code

Added snapshot to gofonmacros
[gosa.git] / plugins / gofon / phoneaccount / class_phoneAccount.inc
index 0c4363cde71a74283cca57043a16e1ce085dd439..b38336fe90e1a65f25d0ed81968c0a774355b28e 100644 (file)
@@ -959,9 +959,9 @@ class phoneAccount extends plugin
     $ldap= $this->config->get_ldap_link();
     $ldap->cd($this->dn);
     $this->cleanup();
-$ldap->modify ($this->attrs); 
+    $ldap->modify ($this->attrs); 
 
-    show_ldap_error($ldap->get_error());
+    show_ldap_error($ldap->get_error(), _("Saving phone account failed"));
 
     /* Optionally execute a command after we're done */
 
@@ -1014,6 +1014,8 @@ $ldap->modify ($this->attrs);
 
   function remove_from_parent()
   {
+    if(!$this->initially_was_account) return;
+
     foreach($this->attributes as $key=>$val){
       if(in_array($val,array("uid","cn"))){
         unset($this->attributes[$key]);
@@ -1118,9 +1120,9 @@ $ldap->modify ($this->attrs);
     }
     $ldap->cd($this->dn);
     $this->cleanup();
-$ldap->modify ($this->attrs); 
+    $ldap->modify ($this->attrs); 
 
-    show_ldap_error($ldap->get_error());
+    show_ldap_error($ldap->get_error(), _("Removing phone account failed"));
 
     /* Optionally execute a command after we're done */
     @mysql_close($r_con);