Code

Made kolab compatible with serverservice tab
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Fri, 9 Jun 2006 04:28:29 +0000 (04:28 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Fri, 9 Jun 2006 04:28:29 +0000 (04:28 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@3719 594d385d-05f5-0310-b6e9-bd551577e9d8

plugins/admin/systems/class_servKolab.inc
plugins/admin/systems/servkolab.tpl

index 901133c6216a60096187c842c51a67dd1444ded6..8c4d86192eae82b05af5ab33fc15f3e91e30fcc6 100644 (file)
@@ -35,6 +35,11 @@ class servkolab extends plugin {
       "cyrus_quotawarn");
   var $objectclasses = array("top", "kolab");
 
+  /* Serverservice vars */
+  var $conflicts    = array("goImapServer","goMailServer");
+  var $DisplayName  = "Kolab mail service";
+  var $StatusFlag   = "";
+
   function servkolab($config, $dn = NULL) 
   {
     /* Setting the hostname and tell this Plugin that we are the kolab extension*/
@@ -348,6 +353,51 @@ class servkolab extends plugin {
       $this->handle_post_events("add");
     }
   }
+
+
+  function getListEntry()
+  {
+    $flag = $this->StatusFlag;
+    if(empty($flag)){
+      $fields['Status']       = "";
+    }else{
+      $fields['Status']       = $this->$flag;
+    }
+    $fields['Message']      = _("Kolab mail service");
+    $fields['AllowStart']   = true;
+    $fields['AllowStop']    = true;
+    $fields['AllowRestart'] = true;
+    $fields['AllowRemove']  = true;
+    $fields['AllowEdit']    = true;
+    return($fields);
+  }
+
+    /* Directly save new status flag */
+  function setStatus($value)
+  { 
+    echo "Status flag isn't set .... ";
+    return;
+  
+    if($value == "none") return;
+    if(!$this->initially_was_account) return;
+    $ldap = $this->config->get_ldap_link();
+    $ldap->cd($this->dn);
+    $ldap->cat($this->dn,array("objectClass"));
+    if($ldap->count()){
+
+      $tmp = $ldap->fetch();
+      for($i = 0; $i < $tmp['objectClass']['count']; $i ++){
+        $attrs['objectClass'][] = $tmp['objectClass'][$i];
+      }
+      $flag = $this->StatusFlag;
+      $attrs[$flag] = $value;
+      $this->$flag = $value;
+      $ldap->modify($attrs);
+      show_ldap_error($ldap->get_error());
+      $this->action_hook();
+    }
+  }
+
 }
 
 // vim:tabstop=2:expandtab:shiftwidth=2:filetype=php:syntax:ruler:
index 446340eb235a98d1d610491d9373abecb7ff57a3..e7276ee99e4ceaa869759660a30fe528de102129 100644 (file)
 </table>
 
 <input type="hidden" name="kolabtab">
+
+<p class="seperator">&nbsp;</p>
+<p>
+<div style="width:100%; text-align:right;">
+    <input type='submit' name='SaveService' value='{t}Save{/t}'>
+    &nbsp;
+    <input type='submit' name='CancelService' value='{t}Cancel{/t}'>
+</div>
+</p>
+