From 59822b38f3819850678e5d3ef612e2c007d91fef Mon Sep 17 00:00:00 2001 From: hickert Date: Mon, 6 Mar 2006 09:27:35 +0000 Subject: [PATCH] Display print_red message instead of php error ... git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@2813 594d385d-05f5-0310-b6e9-bd551577e9d8 --- plugins/admin/groups/class_groupGeneric.inc | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/plugins/admin/groups/class_groupGeneric.inc b/plugins/admin/groups/class_groupGeneric.inc index efacfb29e..ef3a41949 100644 --- a/plugins/admin/groups/class_groupGeneric.inc +++ b/plugins/admin/groups/class_groupGeneric.inc @@ -533,8 +533,20 @@ class group extends plugin /* Add samba group functionality */ if ($this->samba3 && $this->smbgroup){ - $this->SID= $this->config->data['SERVERS']['SAMBA'][$this->sambaDomainName]['SID']; - $this->ridBase= $this->config->data['SERVERS']['SAMBA'][$this->sambaDomainName]['RIDBASE']; + + /* Fixed undefined index ... + */ + $this->SID = $this->ridBase = ""; + if(isset($this->config->data['SERVERS']['SAMBA'][$this->sambaDomainName]['SID'])){ + $this->SID = $this->config->data['SERVERS']['SAMBA'][$this->sambaDomainName]['SID']; + }else{ + print_red(sprintf(_("No configured SID found for '%s'."),$this->sambaDomainName)); + } + if(isset($this->config->data['SERVERS']['SAMBA'][$this->sambaDomainName]['RIDBASE'])){ + $this->ridBase= $this->config->data['SERVERS']['SAMBA'][$this->sambaDomainName]['RIDBASE']; + }else{ + print_red(sprintf(_("No configured RIDBASE found for '%s'."),$this->sambaDomainName)); + } $this->attrs['objectClass'][]= 'sambaGroupMapping'; $this->attrs['sambaGroupType']= "2"; -- 2.30.2