LSldapObject : Fix method to get rdn value

This commit is contained in:
Benjamin Renard 2015-02-13 13:55:28 +01:00
parent e494784859
commit 91dbcf4a6e

View file

@ -865,7 +865,7 @@ class LSldapObject {
return $this -> dn;
}
else if(($val=='rdn')||($val=='%{rdn}')) {
return $this -> attrs[ $this -> config['rdn'] ] -> getValue();
return $this -> rdn;
}
else if(($val=='subDn')||($val=='%{subDn}')) {
return $this -> subDnValue;
@ -1805,13 +1805,19 @@ class LSldapObject {
$this -> cache['subDnValue'] = self :: getSubDnValue($this -> dn);
return $this -> cache['subDnValue'];
}
if ($key=='subDnName') {
elseif ($key=='subDnName') {
if ($this -> cache['subDnName']) {
return $this -> cache['subDnName'];
}
$this -> cache['subDnName'] = self :: getSubDnName($this -> dn);
return $this -> cache['subDnName'];
}
elseif ($key=='rdn') {
if ($this -> config['rdn'] && isset($this -> attrs[ $this -> config['rdn'] ])) {
return $this -> attrs[ $this -> config['rdn'] ] -> getValue();
}
return false;
}
}
}