From: hickert Date: Tue, 20 Jun 2006 06:31:54 +0000 (+0000) Subject: Fixed undefined index X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=2ce29bda019f5528151795ac2a6fd8a13379b5e3;p=gosa.git Fixed undefined index git-svn-id: https://oss.gonicus.de/repositories/gosa/branches/2.5@3826 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/include/class_config.inc b/include/class_config.inc index 88754e069..e84d684b5 100644 --- a/include/class_config.inc +++ b/include/class_config.inc @@ -364,16 +364,19 @@ class config { 'QUEUE_MEMBER_TABLE' => "queue_members"); } - /* Get asterisk servers */ + /* Get glpi 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(); - $this->data['SERVERS']['GLPI']= array( - 'SERVER' => $attrs['cn'][0], - 'LOGIN' => $attrs['goGlpiAdmin'][0], - 'PASSWORD' => $attrs['goGlpiPassword'][0], - 'DB' => $attrs['goGlpiDatabase'][0]); + if(!isset($attrs['goGlpiPassword'])){ + $attrs['goGlpiPassword'][0] =""; + } + $this->data['SERVERS']['GLPI']= array( + 'SERVER' => $attrs['cn'][0], + 'LOGIN' => $attrs['goGlpiAdmin'][0], + 'PASSWORD' => $attrs['goGlpiPassword'][0], + 'DB' => $attrs['goGlpiDatabase'][0]); } /* Get logdb server */ $ldap->cd ($this->current['BASE']);