Code

Fixed Translation Strings.
[gosa.git] / plugins / admin / systems / class_goMailServer.inc
index 5bb4c8a82bec3e7dd5bcb4218914ab3ddd856838..d8e1985691c04af3e6390bb986f1d70200c6988a 100644 (file)
@@ -476,6 +476,7 @@ class goMailServer extends plugin{
   /* Return list entry */
   function getListEntry()
   {
+    $this->updateStatusState();
     $flag = $this->StatusFlag;
     $fields['Status']     = $this->$flag;
     $fields['Message']    = _("Postfix")." ["._("configured for")." ".$this->postfixMyhostname."] ";
@@ -732,6 +733,25 @@ class goMailServer extends plugin{
     }
   }
 
+
+  /* Get updates for status flag */
+  function updateStatusState()
+  {
+    if(empty($this->StatusFlag)) return;
+
+    $attrs = array();
+    $flag = $this->StatusFlag;
+    $ldap = $this->config->get_ldap_link();
+    $ldap->cd($this->cn);
+    $ldap->cat($this->dn,array($flag));
+    if($ldap->count()){
+      $attrs = $ldap->fetch();
+    }
+    if(isset($attrs[$flag][0])){
+      $this->$flag = $attrs[$flag][0];
+    }
+  }
+
   function save_object()
   {
     plugin::save_object();