Use calls to getRootDSE()
This commit is contained in:
parent
57d405fe3b
commit
5481f61ce3
@ -13,18 +13,12 @@
|
|||||||
|
|
||||||
require './common.php';
|
require './common.php';
|
||||||
|
|
||||||
# Fetch basic RootDSE attributes using the + and *.
|
$attrs = $app['server']->getRootDSE();
|
||||||
|
|
||||||
$query = array();
|
$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['base'] = $attrs['monitorcontext'];
|
||||||
$query['scope'] = 'sub';
|
$query['scope'] = 'sub';
|
||||||
|
$query['attrs'] = array('+','*');
|
||||||
$results = $app['server']->query($query,null);
|
$results = $app['server']->query($query,null);
|
||||||
|
|
||||||
if (! isset($attrs['monitorcontext']) || ! count($results))
|
if (! isset($attrs['monitorcontext']) || ! count($results))
|
||||||
|
@ -13,14 +13,7 @@
|
|||||||
|
|
||||||
require './common.php';
|
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_pop($results);
|
|
||||||
|
|
||||||
printf('<h3 class="title">%s%s</h3>',_('Server info for: '),$app['server']->getName());
|
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'));
|
printf('<h3 class="subtitle">%s</h3>',_('Server reports the following information about itself'));
|
||||||
|
@ -250,19 +250,8 @@ class HTMLTree extends Tree {
|
|||||||
if (! $_SESSION[APPCONFIG]->isCommandAvailable('script','monitor'))
|
if (! $_SESSION[APPCONFIG]->isCommandAvailable('script','monitor'))
|
||||||
return '';
|
return '';
|
||||||
|
|
||||||
# Fetch basic RootDSE attributes using the + and *.
|
$attrs = $server->getRootDSE();
|
||||||
$query = array();
|
if (! $attrs || ! isset($attrs['monitorcontext']))
|
||||||
$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']))
|
|
||||||
return '';
|
return '';
|
||||||
|
|
||||||
$menu['cmd'] = 'monitor';
|
$menu['cmd'] = 'monitor';
|
||||||
|
Loading…
Reference in New Issue
Block a user