Code

Fixed save method to prevent errors
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Thu, 8 Jun 2006 04:57:52 +0000 (04:57 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Thu, 8 Jun 2006 04:57:52 +0000 (04:57 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@3688 594d385d-05f5-0310-b6e9-bd551577e9d8

plugins/admin/systems/class_goMailServer.inc

index 701428b02831b8900dd6dc1e0b98c8ebd3d0a2b7..851ad5b5846ec90995fdf6a05590cc2d259f31dc 100644 (file)
@@ -504,6 +504,9 @@ class goMailServer extends plugin{
 
   function save()
   {
+    $this->postfixMyDomain   = preg_replace("/^[^\.]+\./","",$this->postfixMyhostname);
+    $this->postfixMyhostname = preg_replace("/\..*$/","",$this->postfixMyhostname);
+
     plugin::save();
 
     /* Fix transport table*/
@@ -546,14 +549,11 @@ class goMailServer extends plugin{
       foreach($this->postfixMyNetworks as $entry){
         $this->attrs['postfixMyNetworks'] .=$entry.",";
       }
+      $this->postfixMyNetworks = preg_replace("/,$/","",$this->attrs['postfixMyNetworks']);
     }else{
       $this->attrs['postfixMyNetworks']  = array();
     }
 
-    $this->attrs['postfixMyNetworks'] = preg_replace("/,$/","",$this->attrs['postfixMyNetworks']);
-
-    $this->attrs['postfixMyhostname'] = preg_replace("/\..*$/","",$this->postfixMyhostname);
-    $this->attrs['postfixMyDomain']   = preg_replace("/^[^\.]+\./","",$this->postfixMyhostname);
  
     /* Check if this is a new entry ... add/modify */
     $ldap = $this->config->get_ldap_link();
@@ -595,7 +595,7 @@ class goMailServer extends plugin{
   function check()
   { 
     $message =plugin::check();
-    
+  
     if(!is_numeric($this->postfixHeaderSizeLimit)){
       $message[] = _("Please specify a numeric value for header size limit.");
     }