From cee6d6e2e4bbd6e46f10fe95bcce242ebd3b02d9 Mon Sep 17 00:00:00 2001 From: hickert Date: Tue, 20 Jun 2006 06:28:07 +0000 Subject: [PATCH] Fixed undefined index git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@3825 594d385d-05f5-0310-b6e9-bd551577e9d8 --- include/class_config.inc | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/include/class_config.inc b/include/class_config.inc index d1f47b457..33bc836d8 100644 --- a/include/class_config.inc +++ b/include/class_config.inc @@ -366,9 +366,12 @@ class config { /* Get asterisk servers */ $ldap->cd ($this->current['BASE']); - $ldap->search ("(objectClass=goGlpiServer)"); + $ldap->search ("(&(objectClass=goGlpiServer)(cn=*)(goGlpiAdmin=*)(goGlpiDatabase=*))",array("cn","goGlpiPassword","goGlpiAdmin","goGlpiDatabase")); if ($ldap->count()){ $attrs= $ldap->fetch(); + if(!isset($attrs['goGlpiPassword'])){ + $attrs['goGlpiPassword'][0] =""; + } $this->data['SERVERS']['GLPI']= array( 'SERVER' => $attrs['cn'][0], 'LOGIN' => $attrs['goGlpiAdmin'][0], -- 2.30.2