diff --git a/trunk/includes/class/class.LSldapObject.php b/trunk/includes/class/class.LSldapObject.php index baf97fb5..291dca5f 100644 --- a/trunk/includes/class/class.LSldapObject.php +++ b/trunk/includes/class/class.LSldapObject.php @@ -55,23 +55,18 @@ class LSldapObject { * * @author Benjamin Renard * - * @param[in] $type_name [required] string Le nom du type de l'objet - * @param[in] $config array La configuration de l'objet - * * @retval boolean true si l'objet a été construit, false sinon. */ - function LSldapObject($type_name,$config='auto') { - $this -> type_name = $type_name; - $this -> config = $config; - if($config=='auto') { - if(isset($GLOBALS['LSobjects'][$type_name])) { - $this -> config = $GLOBALS['LSobjects'][$type_name]; - } - else { - LSerror :: addErrorCode('LSldapObject_01'); - return; - } + function LSldapObject() { + $this -> type_name = get_class($this); + if(is_array($GLOBALS['LSobjects'][$this -> type_name])) { + $this -> config = $GLOBALS['LSobjects'][$this -> type_name]; } + else { + LSerror :: addErrorCode('LSldapObject_01'); + return; + } + foreach($this -> config['attrs'] as $attr_name => $attr_config) { if(!$this -> attrs[$attr_name]=new LSattribute($attr_name,$attr_config,$this)) { return; @@ -935,9 +930,12 @@ class LSldapObject { // Lancement de la recherche $ret=$this -> search ($filter,$sbasedn,$sparams); - + if (is_array($ret)) { foreach($ret as $obj) { + if (in_array('subDnName',$attrs)) { + $obj['attrs']['subDnName']=$this -> getSubDnName($obj['dn']); + } $retInfos[$obj['dn']] = getFData($displayFormat,$obj['attrs']); } } diff --git a/trunk/includes/class/class.LSobjects.LSeecompany.php b/trunk/includes/class/class.LSobjects.LSeecompany.php index 71023770..d2fe6470 100644 --- a/trunk/includes/class/class.LSobjects.LSeecompany.php +++ b/trunk/includes/class/class.LSobjects.LSeecompany.php @@ -26,23 +26,7 @@ * @author Benjamin Renard */ class LSeecompany extends LSldapObject { - - /** - * Constructeur - * - * Cette methode construit l'objet et définis la configuration. - * - * @author Benjamin Renard - * - * @param[in] $config array La configuration de l'objet - * - * @retval boolean true si l'objet a été construit, false sinon. - * - * @see LSldapObject::LSldapObject() - */ - function LSeecompany ($config='auto') { - $this -> LSldapObject('LSeecompany',$config); - } + // ~ } ?> diff --git a/trunk/includes/class/class.LSobjects.LSeegroup.php b/trunk/includes/class/class.LSobjects.LSeegroup.php index a6113de9..61a77dba 100644 --- a/trunk/includes/class/class.LSobjects.LSeegroup.php +++ b/trunk/includes/class/class.LSobjects.LSeegroup.php @@ -30,23 +30,6 @@ class LSeegroup extends LSldapObject { var $userObjectType = 'LSeepeople'; var $memberAttr = 'uniqueMember'; - /** - * Constructeur - * - * Cette methode construit l'objet et définis la configuration. - * - * @author Benjamin Renard - * - * @param[in] $config array La configuration de l'objet - * - * @retval boolean true si l'objet a été construit, false sinon. - * - * @see LSldapObject::LSldapObject() - */ - function LSeegroup ($config='auto') { - $this -> LSldapObject('LSeegroup',$config); - } - /* ========== Members ========== */ /** * Retourne la valeur clef d'un membre diff --git a/trunk/includes/class/class.LSobjects.LSeepeople.php b/trunk/includes/class/class.LSobjects.LSeepeople.php index f5209dd4..fc25d3ba 100644 --- a/trunk/includes/class/class.LSobjects.LSeepeople.php +++ b/trunk/includes/class/class.LSobjects.LSeepeople.php @@ -26,23 +26,7 @@ * @author Benjamin Renard */ class LSeepeople extends LSldapObject { - - /** - * Constructeur - * - * Cette methode construit l'objet et définis la configuration. - * - * @author Benjamin Renard - * - * @param[in] $config array La configuration de l'objet - * - * @retval boolean true si l'objet a été construit, false sinon. - * - * @see LSldapObject::LSldapObject() - */ - function LSeepeople ($config='auto') { - return $this -> LSldapObject('LSeepeople',$config); - } + // ~ } ?>