Use calls to getRootDSE()

This commit is contained in:
Deon George 2009-07-12 12:28:39 +10:00
parent 57d405fe3b
commit 5481f61ce3
3 changed files with 6 additions and 30 deletions

View File

@ -13,18 +13,12 @@
require './common.php';
# Fetch basic RootDSE attributes using the + and *.
$attrs = $app['server']->getRootDSE();
$query = array();
$query['base'] = '';
$query['scope'] = 'base';
$query['attrs'] = $app['server']->getValue('server','root_dse_attributes');
$query['baseok'] = true;
$results = $app['server']->query($query,null);
$attrs = array_change_key_case(array_pop($results));
$query['base'] = $attrs['monitorcontext'];
$query['scope'] = 'sub';
$query['attrs'] = array('+','*');
$results = $app['server']->query($query,null);
if (! isset($attrs['monitorcontext']) || ! count($results))

View File

@ -13,14 +13,7 @@
require './common.php';
# Fetch basic RootDSE attributes using the + and *.
$query = array();
$query['base'] = '';
$query['scope'] = 'base';
$query['attrs'] = $app['server']->getValue('server','root_dse_attributes');
$query['baseok'] = true;
$results = $app['server']->query($query,null);
$attrs = array_pop($results);
$attrs = $app['server']->getRootDSE();
printf('<h3 class="title">%s%s</h3>',_('Server info for: '),$app['server']->getName());
printf('<h3 class="subtitle">%s</h3>',_('Server reports the following information about itself'));

View File

@ -250,19 +250,8 @@ class HTMLTree extends Tree {
if (! $_SESSION[APPCONFIG]->isCommandAvailable('script','monitor'))
return '';
# Fetch basic RootDSE attributes using the + and *.
$query = array();
$query['base'] = '';
$query['scope'] = 'base';
$query['attrs'] = $server->getValue('server','root_dse_attributes');
$query['baseok'] = true;
$results = $server->query($query,null);
if ($results)
$attrs = array_change_key_case(array_pop($results));
else
return '';
if (! isset($attrs['monitorcontext']))
$attrs = $server->getRootDSE();
if (! $attrs || ! isset($attrs['monitorcontext']))
return '';
$menu['cmd'] = 'monitor';