Code

Do not set primary mail address while we create a new dist list.
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Tue, 12 Oct 2010 10:28:04 +0000 (10:28 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Tue, 12 Oct 2010 10:28:04 +0000 (10:28 +0000)
-distAdd already assigns a primary mail address

git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@19999 594d385d-05f5-0310-b6e9-bd551577e9d8

gosa-plugins/groupware/admin/ogroups/GroupwareDistributionList/class_GroupwareDistributionList.inc

index 29766a234295235babc8170a36f1bea7ec30338f..5bcf5d161209d52bd2388bd29339be271850f858 100644 (file)
@@ -411,7 +411,7 @@ class GroupwareDistributionList extends plugin
         // Updated primaryMailAddress value, if needed:  
         //  -> is a new distribution list or
         //  -> the value for 'primaryMailAddress' has changed.
-        if(!$this->initially_was_account || $this->primaryMailAddress != $this->saved_attributes['primaryMailAddress']){
+        if($this->initially_was_account && $this->primaryMailAddress != $this->saved_attributes['primaryMailAddress']){
             $rpc->gwDistSetPrimaryMailAddress($this->cn, $this->primaryMailAddress);
             if(!$rpc->success()){
                 $message = sprintf(_("Failed to update the primary mail address for distribution list '%s'! Error was: '%s'."),