Code

Fixed FAx Account removement & fax copy & paste
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Tue, 14 Nov 2006 06:03:34 +0000 (06:03 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Tue, 14 Nov 2006 06:03:34 +0000 (06:03 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/branches/2.5@5093 594d385d-05f5-0310-b6e9-bd551577e9d8

plugins/gofax/faxaccount/class_gofaxAccount.inc

index 137790818b3496bd0a79b64a14c93bf91434b5c3..283799d59ab490759e2c059db4edbdab0f68523f 100644 (file)
@@ -39,11 +39,10 @@ class gofaxAccount extends plugin
   var $current_blocklist= array();
 
   /* Copy & paste variables */
-  var $CopyPasteVars=array("facsimileTelephoneNumber","goFaxRBlocklist","goFaxRBlockgroups","goFaxSBlocklist","goFaxSBlockgroups");
+  var $CopyPasteVars=array("facsimileTelephoneNumber");//,"goFaxRBlocklist","goFaxRBlockgroups","goFaxSBlocklist","goFaxSBlockgroups");
 
   /* attribute list for save action */
-  var $attributes= array("goFaxDeliveryMode", "goFaxIsEnabled","facsimileAlternateTelephoneNumber",
-      "goFaxPrinter", "goFaxDivertNumber", "goFaxLanguage", "goFaxFormat", "mail","facsimileTelephoneNumber");
+  var $attributes= array("goFaxDeliveryMode", "goFaxIsEnabled","facsimileAlternateTelephoneNumber","goFaxRBlocklist","goFaxRBlockgroups","goFaxSBlocklist","goFaxSBlockgroups","goFaxPrinter", "goFaxDivertNumber", "goFaxLanguage", "goFaxFormat", "mail","facsimileTelephoneNumber");
   var $objectclasses= array("goFaxAccount");
 
   var $uid= "";
@@ -613,13 +612,6 @@ class gofaxAccount extends plugin
 
     plugin::remove_from_parent();
 
-    /* Zero out arrays */
-    foreach (array("goFaxRBlocklist", "goFaxRBlockgroups", "goFaxSBlocklist",
-          "goFaxSBlockgroups", "facsimileAlternateTelephoneNumber") as $val){
-
-      $this->attrs[$val]= array();
-    }
-
     /* Adapt mail settings if needed */
     if ((isset($this->parent->by_object['mailAccount']->is_account)) && ($this->parent->by_object['mailAccount']->is_account)){
       unset($this->attrs['mail']);
@@ -738,7 +730,9 @@ class gofaxAccount extends plugin
     }
 
     /* Do not save mail address ... it was possibly changed by mail plugin*/
-    unset($this->attrs['mail']);
+    if ((isset($this->parent->by_object['mailAccount']->is_account)) && ($this->parent->by_object['mailAccount']->is_account)){
+      unset($this->attrs['mail']);
+    }
 
     /* Write back to ldap */
     $ldap= $this->config->get_ldap_link();