Code

Fixed potentialy undefined ridbases. Closes #352
authorcajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8>
Fri, 29 Feb 2008 21:04:47 +0000 (21:04 +0000)
committercajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8>
Fri, 29 Feb 2008 21:04:47 +0000 (21:04 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/branches/2.5@9221 594d385d-05f5-0310-b6e9-bd551577e9d8

Changelog
plugins/personal/samba/class_sambaAccount.inc

index bcf30a16eba29fd30373ea981fbfb2d51f3b85d8..2a78bfaf755cbfa4dd2701053ff87a7a2a184fc7 100644 (file)
--- a/Changelog
+++ b/Changelog
@@ -1,6 +1,9 @@
 GOsa2 changelog
 ===============
 
+* gosa 2.5.16
+  - ridbase may be undefined in domain objects
+
 * gosa 2.5.15
   - Changed order of sys-action commandline parameters
   - Changed sorting of management plugins to natural sorting
index 651863181ff14c758dab2f646a47eeb1986a6c05..44b8c1814ba620dcca401efde9e9609dffcb9c36 100644 (file)
@@ -126,7 +126,11 @@ class sambaAccount extends plugin
       $ldap->search ("(&(objectClass=sambaDomain)(sambaSID=$this->SID))",array("sambaAlgorithmicRidBase","sambaDomainName"));
       if ($ldap->count() != 0){
         $attrs= $ldap->fetch();
-        $this->ridBase= $attrs['sambaAlgorithmicRidBase'][0];
+        if(isset($attrs['sambaAlgorithmicRidBase'])){
+          $this->ridBase= $attrs['sambaAlgorithmicRidBase'][0];
+        } else {
+          $this->ridBase= $this->config->current['RIDBASE'];
+        }
         if ($this->sambaDomainName == ""){
           $this->sambaDomainName= $attrs['sambaDomainName'][0];
         }