diff --git a/lam/templates/serverInfo.php b/lam/templates/serverInfo.php index 9ef68dce..157889cb 100644 --- a/lam/templates/serverInfo.php +++ b/lam/templates/serverInfo.php @@ -43,8 +43,10 @@ $configcontext = ''; $supportedldapversion = ''; $supportedsaslmechanisms = ''; $subschemasubentry = ''; +$vendorname = ''; +$vendorversion = ''; -$result = @ldap_read($_SESSION['ldap']->server(), '', 'objectclass=*', array('+', '*')); +$result = @ldap_read($_SESSION['ldap']->server(), '', 'objectclass=*', array('+', '*', 'subschemasubentry')); if ($result) { $info = @ldap_get_entries($_SESSION['ldap']->server(), $result); if ($info) { @@ -61,7 +63,7 @@ if ($result) { $configcontext = $info['configcontext'][0]; } if (isset($info['supportedldapversion'])) { - $supportedldapversion = $info['supportedldapversion'][0]; + $supportedldapversion = implode(', ', $info['supportedldapversion']); } if (isset($info['supportedsaslmechanisms'])) { $supportedsaslmechanisms = implode(', ', $info['supportedsaslmechanisms']); @@ -69,6 +71,12 @@ if ($result) { if (isset($info['subschemasubentry'])) { $subschemasubentry = $info['subschemasubentry'][0]; } + if (isset($info['vendorname'])) { + $vendorname = $info['vendorname'][0]; + } + if (isset($info['vendorversion'])) { + $vendorversion = $info['vendorversion'][0]; + } } } @@ -92,8 +100,10 @@ echo "" . $namingContexts . ""; echo "" . _("LDAP version") . "  "; echo "" . $supportedldapversion . ""; -echo "" . _("Config suffix") . "  "; -echo "" . $configcontext . ""; +if ($configcontext != '') { + echo "" . _("Config suffix") . "  "; + echo "" . $configcontext . ""; +} echo "" . _("Schema suffix") . "  "; echo "" . $subschemasubentry . ""; @@ -101,6 +111,16 @@ echo "" . $subschemasubentry . ""; echo "" . _("SASL mechanisms") . "  "; echo "" . $supportedsaslmechanisms . ""; +if ($vendorname != '') { + echo "" . _("Vendor name") . "  "; + echo "" . $vendorname . ""; +} + +if ($vendorversion != '') { + echo "" . _("Vendor version") . "  "; + echo "" . $vendorversion . ""; +} + echo "\n";