From 343ed25bbd636f48f153b3698395523b954726cf Mon Sep 17 00:00:00 2001 From: hickert Date: Fri, 9 Jun 2006 04:28:29 +0000 Subject: [PATCH] Made kolab compatible with serverservice tab git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@3719 594d385d-05f5-0310-b6e9-bd551577e9d8 --- plugins/admin/systems/class_servKolab.inc | 50 +++++++++++++++++++++++ plugins/admin/systems/servkolab.tpl | 10 +++++ 2 files changed, 60 insertions(+) diff --git a/plugins/admin/systems/class_servKolab.inc b/plugins/admin/systems/class_servKolab.inc index 901133c62..8c4d86192 100644 --- a/plugins/admin/systems/class_servKolab.inc +++ b/plugins/admin/systems/class_servKolab.inc @@ -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: diff --git a/plugins/admin/systems/servkolab.tpl b/plugins/admin/systems/servkolab.tpl index 446340eb2..e7276ee99 100644 --- a/plugins/admin/systems/servkolab.tpl +++ b/plugins/admin/systems/servkolab.tpl @@ -196,3 +196,13 @@ + +

 

+

+

+ +   + +
+

+ -- 2.30.2