summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: e6a72e0)
raw | patch | inline | side by side (parent: e6a72e0)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Fri, 9 Jun 2006 08:25:01 +0000 (08:25 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Fri, 9 Jun 2006 08:25:01 +0000 (08:25 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@3744 594d385d-05f5-0310-b6e9-bd551577e9d8
15 files changed:
diff --git a/plugins/admin/systems/class_goCupsServer.inc b/plugins/admin/systems/class_goCupsServer.inc
index 05375062db3b68f45e9c955911fa9084ebfc100d..178cac45a8525b8a940f3a58172d80bf2262dfd2 100644 (file)
function getListEntry()
{
+ $this->updateStatusState();
$flag = $this->StatusFlag;
$fields['Status'] = $this->$flag;
$fields['Message'] = _("Print service");
}
+ /* 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];
+ }
+ }
+
}
// vim:tabstop=2:expandtab:shiftwidth=2:filetype=php:syntax:ruler:
?>
diff --git a/plugins/admin/systems/class_goFaxServer.inc b/plugins/admin/systems/class_goFaxServer.inc
index b5c4783751b3917098806372dc9d0982115e6cff..53e8ad3076cd137ffb72aac8e646cb5d0d84c3cf 100644 (file)
function getListEntry()
{
+ $this->updateStatusState();
$flag = $this->StatusFlag;
$fields['Status'] = $this->$flag;
$fields['Message'] = _("FAX database configuration");
}
}
}
-
+
+ /* 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];
+ }
+ }
}
// vim:tabstop=2:expandtab:shiftwidth=2:filetype=php:syntax:ruler:
?>
diff --git a/plugins/admin/systems/class_goFonServer.inc b/plugins/admin/systems/class_goFonServer.inc
index 074d287ddbb3740ce4f18e6db1503bae7e775620..e8cd4d529b9324d574b7b959c224754d1d318653 100644 (file)
function getListEntry()
{
+ $this->updateStatusState();
$flag = $this->StatusFlag;
$fields['Status'] = $this->$flag;
$fields['Message'] = _("Asterisk management");
}
}
+ /* 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];
+ }
+ }
}
// vim:tabstop=2:expandtab:shiftwidth=2:filetype=php:syntax:ruler:
?>
diff --git a/plugins/admin/systems/class_goGlpiServer.inc b/plugins/admin/systems/class_goGlpiServer.inc
index 9129d1411c096aacbe062399d27992079eb314ec..f73caf538c85245cd55ad704a6bca5ae431cbf54 100644 (file)
function getListEntry()
{
+ $this->updateStatusState();
$flag = $this->StatusFlag;
$fields['Status'] = $this->$flag;
$fields['Message'] = _("Glpi management");
}
}
}
+
+
+ /* 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];
+ }
+ }
}
// vim:tabstop=2:expandtab:shiftwidth=2:filetype=php:syntax:ruler:
diff --git a/plugins/admin/systems/class_goImapServer.inc b/plugins/admin/systems/class_goImapServer.inc
index a7760919f9bc302aa8741c4ec20c70c96fbb1cbf..f934a71be20d302895d29a1671184350c5790b41 100644 (file)
function getListEntry()
{
+ $this->updateStatusState();
$flag = $this->StatusFlag;
$fields['Status'] = $this->$flag;
$fields['Message'] = _("Cyrus service");
}
}
+
+ /* 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];
+ }
+ }
}
// vim:tabstop=2:expandtab:shiftwidth=2:filetype=php:syntax:ruler:
?>
diff --git a/plugins/admin/systems/class_goKrbServer.inc b/plugins/admin/systems/class_goKrbServer.inc
index edc0895365f2351510e1a25c7c6076926df8b9f7..953389a10d8fbd1013aa8c5a6fbee357e0948c8c 100644 (file)
function getListEntry()
{
+ $this->updateStatusState();
$flag = $this->StatusFlag;
$fields['Status'] = $this->$flag;
$fields['Message'] = _("Kerberos kadmin access informations");
}
}
}
-
+
+
+ /* 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];
+ }
+ }
}
// vim:tabstop=2:expandtab:shiftwidth=2:filetype=php:syntax:ruler:
?>
diff --git a/plugins/admin/systems/class_goLdapServer.inc b/plugins/admin/systems/class_goLdapServer.inc
index 271dabdf002d192c4fb63a23fffefc4778d498fd..64d385f8a6ed2ab186a0afe63530a99f0b790a1e 100644 (file)
function getListEntry()
{
+ $this->updateStatusState();
$flag = $this->StatusFlag;
$fields['Status'] = $this->$flag;
$fields['Message'] = _("LDAP Service");
}
}
+ /* 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];
+ }
+ }
}
// vim:tabstop=2:expandtab:shiftwidth=2:filetype=php:syntax:ruler:
?>
diff --git a/plugins/admin/systems/class_goLogDBServer.inc b/plugins/admin/systems/class_goLogDBServer.inc
index aa43f9548a5ad13b5ff5d55c585ee6ec1556c5b6..3c8a414f88e8ea5f83d8da438d4c7d20b1c11f7c 100644 (file)
function getListEntry()
{
+ $this->updateStatusState();
$flag = $this->StatusFlag;
$fields['Status'] = $this->$flag;
$fields['Message'] = _("Logging database");
}
}
+
+ /* 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];
+ }
+ }
+
}
// vim:tabstop=2:expandtab:shiftwidth=2:filetype=php:syntax:ruler:
?>
diff --git a/plugins/admin/systems/class_goMailServer.inc b/plugins/admin/systems/class_goMailServer.inc
index 5bb4c8a82bec3e7dd5bcb4218914ab3ddd856838..d8e1985691c04af3e6390bb986f1d70200c6988a 100644 (file)
/* Return list entry */
function getListEntry()
{
+ $this->updateStatusState();
$flag = $this->StatusFlag;
$fields['Status'] = $this->$flag;
$fields['Message'] = _("Postfix")." ["._("configured for")." ".$this->postfixMyhostname."] ";
}
}
+
+ /* 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();
diff --git a/plugins/admin/systems/class_goNtpServer.inc b/plugins/admin/systems/class_goNtpServer.inc
index 8cb692ffab41356cd38194d19b6694f97501b022..f7a9ea42ea0f881685aab9fed452154794fdd9c3 100644 (file)
function getListEntry()
{
+ $this->updateStatusState();
$flag = $this->StatusFlag;
$fields['Status'] = $this->$flag;
$fields['Message'] = _("NTP service");
}
}
+
+ /* 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 check(){ return array();}
function save_object(){;}
diff --git a/plugins/admin/systems/class_goShareServer.inc b/plugins/admin/systems/class_goShareServer.inc
index fb2d1a5a138685a64cfc3a0540269cda39c9edfb..35b9cf51248086e3b0916ee2230d4258f0559942 100644 (file)
function getListEntry()
{
+ $this->updateStatusState();
$flag = $this->StatusFlag;
$fields['Status'] = $this->$flag;
$fields['Message'] = _("Shares");
}
}
+ /* 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];
+ }
+ }
}
// vim:tabstop=2:expandtab:shiftwidth=2:filetype=php:syntax:ruler:
diff --git a/plugins/admin/systems/class_goSyslogServer.inc b/plugins/admin/systems/class_goSyslogServer.inc
index 2aa5a33ed0a939f765adc148bb979996ed66e210..1dec56f6dd7f88762a652c09e5cca95bd3d3cb0b 100644 (file)
function getListEntry()
{
+ $this->updateStatusState();
$flag = $this->StatusFlag;
$fields['Status'] = $this->$flag;
$fields['Message'] = _("Syslog service");
}
}
+
+ /* 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];
+ }
+ }
+
}
// vim:tabstop=2:expandtab:shiftwidth=2:filetype=php:syntax:ruler:
?>
diff --git a/plugins/admin/systems/class_goTerminalServer.inc b/plugins/admin/systems/class_goTerminalServer.inc
index 501546fc618a48de2847dae2a21d8314fb0efe23..be3a6640cc8c524d187a776f4ed6cf2cb72c0d44 100644 (file)
function getListEntry()
{
+ $this->updateStatusState();
$flag = $this->StatusFlag;
$fields['Status'] = $this->$flag;
$fields['Message'] = _("Terminal service");
}
}
+
+ /* 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];
+ }
+ }
+
}
// vim:tabstop=2:expandtab:shiftwidth=2:filetype=php:syntax:ruler:
?>
index a507d486edd84d0961ef4325c9e101ca427e35e4..bb40188ccb0474a347d4b38a69f6613904983776 100644 (file)
function getListEntry()
{
+ $this->updateStatusState();
$flag = $this->StatusFlag;
if(empty($flag)){
$fields['Status'] = "";
}
}
+
+ /* 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];
+ }
+ }
}
// vim:tabstop=2:expandtab:shiftwidth=2:filetype=php:syntax:ruler:
diff --git a/plugins/admin/systems/class_serverService.inc b/plugins/admin/systems/class_serverService.inc
index 7f8754d3b84846da65c4a0dbb24c5c9763f7942d..b0065d6cf0ca0c75d6cf06dac4662bbb9eb68087 100644 (file)
$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){
- $flag = $this->plugins[$name]->StatusFlag;
- if(isset($attrs[$flag][0])){
- $this->plugins[$name]->$flag = $attrs[$flag][0];
- }
$list[$name] = $this->plugins[$name]->getListEntry();
}
}