Code

Added snapshot to gofonmacros
[gosa.git] / plugins / gofon / phoneaccount / class_phoneAccount.inc
index 80660f27e9d03b329bd41f6924a296a779f32886..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);
@@ -1157,6 +1159,8 @@ $ldap->modify ($this->attrs);
     }
   }
 
+
+  /* Create phoneAccount part of copy & paste dialog */
   function getCopyDialog()
   { 
     if(!$this->is_account) return("");
@@ -1177,6 +1181,7 @@ $ldap->modify ($this->attrs);
     return($ret);
   }
 
+  /* Save posts from copy & paste dialog dialog  */
   function saveCopyDialog()
   {
     if(!$this->is_account) return;