index 7ef00cb6c44ed0147f48022ff48ab5fd674ce3c4..a7d3a53b6a0e17e7001f2bde8a2ab0560a667325 100644 (file)
--- a/include/class_config.inc
+++ b/include/class_config.inc
'DB' => $attrs['goGlpiDatabase'][0]);
}
+
/* Get logdb server */
$ldap->cd ($this->current['BASE']);
- $ldap->search ("(objectClass=goLogDBServer)",array("cn","goLogDBServerUser","goLogDBServerPassword","goLogDB"));
+ $ldap->search ("(objectClass=goLogDBServer)");
if ($ldap->count()){
$attrs= $ldap->fetch();
+ $this->data['SERVERS']['LOG']= array( 'SERVER' => $attrs['cn'][0],
+ 'LOGIN' => $attrs['goLogAdmin'][0],
+ 'PASSWORD' => $attrs['goLogPassword'][0]);
+ }
+
+
+ /* GOsa logging databases */
+ $ldap->cd ($this->current['BASE']);
+ $ldap->search ("(objectClass=gosaLogServer)");
+ if ($ldap->count()){
+ while($attrs= $ldap->fetch()){
$this->data['SERVERS']['LOGGING'][$attrs['cn'][0]]=
- array('USER' => $attrs['goLogDBServerUser'][0],
- 'PWD' => $attrs['goLogDBServerPassword'][0],
- 'DB' => $attrs['goLogDB'][0]);
+ array(
+ 'DN' => $attrs['dn'],
+ 'USER' => $attrs['goLogDBUser'][0],
+ 'DB' => $attrs['goLogDB'][0],
+ 'PWD' => $attrs['goLogDBPassword'][0]);
+ }
}
+
/* Get NFS server lists */
$tmp= array("default");
$ldap->cd ($this->current['BASE']);
$depth ++;
/* Walk through array */
+ ksort($arr);
foreach($arr as $name => $entries){
/* If this department is the last in the current tree position
if(isset($entries['ENTRY'])){
$a = "";
for($i = 0 ; $i < $depth ; $i ++){
- $a.=" ";
+ $a.=".";
}
$ret[$entries['ENTRY']]=$a." ".$name;
}