From d9390f6d5519fc8fbd38cf21cec0feccd89a4cfd Mon Sep 17 00:00:00 2001 From: hickert Date: Fri, 9 Jun 2006 08:05:56 +0000 Subject: [PATCH] Added status flag fix git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@3742 594d385d-05f5-0310-b6e9-bd551577e9d8 --- plugins/admin/systems/class_goCupsServer.inc | 2 +- plugins/admin/systems/class_goFaxServer.inc | 2 +- plugins/admin/systems/class_goFonServer.inc | 2 +- plugins/admin/systems/class_goGlpiServer.inc | 2 +- plugins/admin/systems/class_goImapServer.inc | 3 +-- plugins/admin/systems/class_goKrbServer.inc | 2 +- plugins/admin/systems/class_goLdapServer.inc | 2 +- plugins/admin/systems/class_goLogDBServer.inc | 2 +- plugins/admin/systems/class_goMailServer.inc | 2 +- plugins/admin/systems/class_goNtpServer.inc | 2 +- plugins/admin/systems/class_goShareServer.inc | 2 +- plugins/admin/systems/class_goSyslogServer.inc | 2 +- .../admin/systems/class_goTerminalServer.inc | 2 +- plugins/admin/systems/class_serverService.inc | 17 ++++++++++++++++- 14 files changed, 29 insertions(+), 15 deletions(-) diff --git a/plugins/admin/systems/class_goCupsServer.inc b/plugins/admin/systems/class_goCupsServer.inc index 427f7e842..05375062d 100644 --- a/plugins/admin/systems/class_goCupsServer.inc +++ b/plugins/admin/systems/class_goCupsServer.inc @@ -8,7 +8,7 @@ class goCupsServer extends plugin{ /* This plugin only writes its objectClass */ var $objectclasses = array("goCupsServer"); - var $attributes = array("goCupsServerStatus"); + var $attributes = array(); var $StatusFlag = "goCupsServerStatus"; /* This class can't be assigned twice so it conflicts with itsself */ diff --git a/plugins/admin/systems/class_goFaxServer.inc b/plugins/admin/systems/class_goFaxServer.inc index 8572f6dfa..b5c478375 100644 --- a/plugins/admin/systems/class_goFaxServer.inc +++ b/plugins/admin/systems/class_goFaxServer.inc @@ -8,7 +8,7 @@ class goFaxServer extends plugin{ /* This plugin only writes its objectClass */ var $objectclasses = array("goFaxServer"); - var $attributes = array("goFaxServerStatus","goFaxAdmin", "goFaxPassword"); + var $attributes = array("goFaxAdmin", "goFaxPassword"); var $StatusFlag = "goFaxServerStatus"; /* This class can't be assigned twice so it conflicts with itsself */ diff --git a/plugins/admin/systems/class_goFonServer.inc b/plugins/admin/systems/class_goFonServer.inc index 7f65e8e40..074d287dd 100644 --- a/plugins/admin/systems/class_goFonServer.inc +++ b/plugins/admin/systems/class_goFonServer.inc @@ -8,7 +8,7 @@ class goFonServer extends plugin{ /* This plugin only writes its objectClass */ var $objectclasses = array("goFonServer"); - var $attributes = array("goFonServerStatus","goFonAdmin", "goFonPassword","goFonAreaCode", "goFonCountryCode"); + var $attributes = array("goFonAdmin", "goFonPassword","goFonAreaCode", "goFonCountryCode"); var $StatusFlag = "goFonServerStatus"; /* This class can't be assigned twice so it conflicts with itsself */ diff --git a/plugins/admin/systems/class_goGlpiServer.inc b/plugins/admin/systems/class_goGlpiServer.inc index 4d3418ef3..9129d1411 100644 --- a/plugins/admin/systems/class_goGlpiServer.inc +++ b/plugins/admin/systems/class_goGlpiServer.inc @@ -8,7 +8,7 @@ class goGlpiServer extends plugin{ /* This plugin only writes its objectClass */ var $objectclasses = array("goGlpiServer"); - var $attributes = array("goGlpiServerStatus","goGlpiAdmin","goGlpiDatabase","goGlpiPassword"); + var $attributes = array("goGlpiAdmin","goGlpiDatabase","goGlpiPassword"); var $StatusFlag = "goGlpiServerStatus"; /* This class can't be assigned twice so it conflicts with itsself */ diff --git a/plugins/admin/systems/class_goImapServer.inc b/plugins/admin/systems/class_goImapServer.inc index c1571e64f..a7760919f 100644 --- a/plugins/admin/systems/class_goImapServer.inc +++ b/plugins/admin/systems/class_goImapServer.inc @@ -14,8 +14,7 @@ class goImapServer extends plugin{ var $DisplayName = ""; var $dn = NULL; var $StatusFlag = "goImapServerStatus"; - var $attributes = array("goImapServerStatus", - "goImapName","goImapConnect","goImapAdmin","goImapPassword", + var $attributes = array("goImapName","goImapConnect","goImapAdmin","goImapPassword", "goImapSieveServer","goImapSievePort", "cyrusImap","cyrusImapSSL","cyrusPop3","cyrusPop3SSL"); diff --git a/plugins/admin/systems/class_goKrbServer.inc b/plugins/admin/systems/class_goKrbServer.inc index 0b3b79c4f..edc089536 100644 --- a/plugins/admin/systems/class_goKrbServer.inc +++ b/plugins/admin/systems/class_goKrbServer.inc @@ -8,7 +8,7 @@ class goKrbServer extends plugin{ /* This plugin only writes its objectClass */ var $objectclasses = array("goKrbServer"); - var $attributes = array("goKrbServerStatus","goKrbRealm", "goKrbAdmin","goKrbPassword"); + var $attributes = array("goKrbRealm", "goKrbAdmin","goKrbPassword"); var $StatusFlag = "goKrbServerStatus"; /* This class can't be assigned twice so it conflicts with itsself */ diff --git a/plugins/admin/systems/class_goLdapServer.inc b/plugins/admin/systems/class_goLdapServer.inc index 8cce87d2d..271dabdf0 100644 --- a/plugins/admin/systems/class_goLdapServer.inc +++ b/plugins/admin/systems/class_goLdapServer.inc @@ -8,7 +8,7 @@ class goLdapServer extends plugin{ /* This plugin only writes its objectClass */ var $objectclasses = array("goLdapServer"); - var $attributes = array("goLdapServerStatus","goLdapBase"); + var $attributes = array("goLdapBase"); var $StatusFlag = "goLdapServerStatus"; /* This class can't be assigned twice so it conflicts with itsself */ diff --git a/plugins/admin/systems/class_goLogDBServer.inc b/plugins/admin/systems/class_goLogDBServer.inc index 2003937a5..aa43f9548 100644 --- a/plugins/admin/systems/class_goLogDBServer.inc +++ b/plugins/admin/systems/class_goLogDBServer.inc @@ -8,7 +8,7 @@ class goLogDBServer extends plugin{ /* This plugin only writes its objectClass */ var $objectclasses = array("goLogDBServer"); - var $attributes = array("goLogDBServerStatus","goLogAdmin", "goLogPassword"); + var $attributes = array("goLogAdmin", "goLogPassword"); var $StatusFlag = "goLogDBServerStatus"; /* This class can't be assigned twice so it conflicts with itsself */ diff --git a/plugins/admin/systems/class_goMailServer.inc b/plugins/admin/systems/class_goMailServer.inc index 95fe64bd9..5bb4c8a82 100644 --- a/plugins/admin/systems/class_goMailServer.inc +++ b/plugins/admin/systems/class_goMailServer.inc @@ -13,7 +13,7 @@ class goMailServer extends plugin{ var $DisplayName = ""; var $dn = NULL; var $StatusFlag = "goMailServerStatus"; - var $attributes = array("goMailServerStatus","description","postfixHeaderSizeLimit", + var $attributes = array("description","postfixHeaderSizeLimit", "postfixMailboxSizeLimit","postfixMessageSizeLimit", "postfixMyDestinations","postfixMyDomain","postfixMyhostname", "postfixMyNetworks","postfixRelayhost","postfixTransportTable", diff --git a/plugins/admin/systems/class_goNtpServer.inc b/plugins/admin/systems/class_goNtpServer.inc index dbfc1401d..8cb692ffa 100644 --- a/plugins/admin/systems/class_goNtpServer.inc +++ b/plugins/admin/systems/class_goNtpServer.inc @@ -8,7 +8,7 @@ class goNtpServer extends plugin{ /* This plugin only writes its objectClass */ var $objectclasses = array("goNtpServer"); - var $attributes = array("goTimeSource","goNtpServerStatus"); + var $attributes = array("goTimeSource"); var $StatusFlag = "goNtpServerStatus"; /* This class can't be assigned twice so it conflicts with itsself */ diff --git a/plugins/admin/systems/class_goShareServer.inc b/plugins/admin/systems/class_goShareServer.inc index 6c968e948..fb2d1a5a1 100644 --- a/plugins/admin/systems/class_goShareServer.inc +++ b/plugins/admin/systems/class_goShareServer.inc @@ -8,7 +8,7 @@ class goShareServer extends plugin{ /* This plugin only writes its objectClass */ var $objectclasses = array("goShareServer"); - var $attributes = array("goShareServerStatus","goExportEntry"); + var $attributes = array("goExportEntry"); var $StatusFlag = "goShareServerStatus"; /* This class can't be assigned twice so it conflicts with itsself */ diff --git a/plugins/admin/systems/class_goSyslogServer.inc b/plugins/admin/systems/class_goSyslogServer.inc index a84670e21..2aa5a33ed 100644 --- a/plugins/admin/systems/class_goSyslogServer.inc +++ b/plugins/admin/systems/class_goSyslogServer.inc @@ -8,7 +8,7 @@ class goSyslogServer extends plugin{ /* This plugin only writes its objectClass */ var $objectclasses = array("goSyslogServer"); - var $attributes = array("goSyslogServerStatus"); + var $attributes = array(); var $StatusFlag = "goSyslogServerStatus"; /* This class can't be assigned twice so it conflicts with itsself */ diff --git a/plugins/admin/systems/class_goTerminalServer.inc b/plugins/admin/systems/class_goTerminalServer.inc index 262ad19a1..501546fc6 100644 --- a/plugins/admin/systems/class_goTerminalServer.inc +++ b/plugins/admin/systems/class_goTerminalServer.inc @@ -8,7 +8,7 @@ class goTerminalServer extends plugin{ /* This plugin only writes its objectClass */ var $objectclasses = array("goTerminalServer"); - var $attributes = array("goTerminalServerStatus","goXdmcpIsEnabled", "goFontPath"); + var $attributes = array("goXdmcpIsEnabled", "goFontPath"); var $StatusFlag = "goTerminalServerStatus"; /* This class can't be assigned twice so it conflicts with itsself */ diff --git a/plugins/admin/systems/class_serverService.inc b/plugins/admin/systems/class_serverService.inc index 34b66573e..7f8754d3b 100644 --- a/plugins/admin/systems/class_serverService.inc +++ b/plugins/admin/systems/class_serverService.inc @@ -188,9 +188,24 @@ class ServerService extends plugin /* Dispaly services overview */ $this->divList->execute(); $list = array(); + + $ldap = $this->config->get_ldap_link(); + $ldap->cd($this->dn); + $ldap->cat($this->dn); + + if($ldap->count()){ + $attrs = $ldap->fetch(); + }else{ + $attrs = array(); + } + foreach($this->plugins as $name => $obj){ if($obj->is_account){ - $list[$name] = $obj->getListEntry(); + $flag = $this->plugins[$name]->StatusFlag; + if(isset($attrs[$flag][0])){ + $this->plugins[$name]->$flag = $attrs[$flag][0]; + } + $list[$name] = $this->plugins[$name]->getListEntry(); } } $this->divList -> setEntries($list); -- 2.30.2