From: hickert Date: Mon, 6 Mar 2006 09:27:35 +0000 (+0000) Subject: Display print_red message instead of php error ... X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=59822b38f3819850678e5d3ef612e2c007d91fef;p=gosa.git Display print_red message instead of php error ... git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@2813 594d385d-05f5-0310-b6e9-bd551577e9d8 --- 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";