Code

Display print_red message instead of php error ...
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Mon, 6 Mar 2006 09:27:35 +0000 (09:27 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Mon, 6 Mar 2006 09:27:35 +0000 (09:27 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@2813 594d385d-05f5-0310-b6e9-bd551577e9d8

plugins/admin/groups/class_groupGeneric.inc

index efacfb29ed7733fed353fbfa541f0d2104555cf2..ef3a41949f5e6168bea67bae91655eaa2ade52e3 100644 (file)
@@ -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";