diff --git a/public_html/includes/class/class.LSldapObject.php b/public_html/includes/class/class.LSldapObject.php index 7020c1c9..e4bb6d19 100644 --- a/public_html/includes/class/class.LSldapObject.php +++ b/public_html/includes/class/class.LSldapObject.php @@ -490,7 +490,7 @@ class LSldapObject { $sfilter_user=NULL; } if(isset($test['object_type']) && LSsession :: loadLSobject($test['object_type']) ) { - $sfilter=self :: getObjectFilter($test['object_type']); + $sfilter=self :: _getObjectFilter($test['object_type']); if ($sfilter_user) { $sfilter=LSldap::combineFilters('and',array($sfilter_user,$sfilter)); @@ -692,6 +692,17 @@ class LSldapObject { $basedn.=','.$infos[$i]; return array($infos[0],$basedn); } + + /** + * Retourne le filtre correpondants aux objetcClass de l'objet courant + * + * @author Benjamin Renard + * + * @retval Net_LDAP2_Filter le filtre ldap correspondant au type de l'objet + */ + public function getObjectFilter() { + return self :: getObjectFilter($this -> type_name); + } /** * Retourne le filtre correpondants aux objetcClass de l'objet @@ -700,10 +711,7 @@ class LSldapObject { * * @retval Net_LDAP2_Filter le filtre ldap correspondant au type de l'objet */ - public static function getObjectFilter($type=null) { - if (is_null($type)) { - $type = $this -> type_name; - } + public static function _getObjectFilter($type) { $oc=LSconfig::get("LSobjects.$type.objectclass"); if(!is_array($oc)) return; $filters=array(); diff --git a/public_html/includes/class/class.LSsearch.php b/public_html/includes/class/class.LSsearch.php index c7505cfd..abb7c9b4 100644 --- a/public_html/includes/class/class.LSsearch.php +++ b/public_html/includes/class/class.LSsearch.php @@ -752,7 +752,7 @@ class LSsearch { } // Filter - $objFilter=LSldapObject::getObjectFilter($this -> LSobject); + $objFilter=LSldapObject::_getObjectFilter($this -> LSobject); if ($objFilter) { if (!is_null($retval['filter'])) { $filter=LSldap::combineFilters('and',array($objFilter,$retval['filter']));