mirror of
https://gitlab.easter-eggs.com/ee/ldapsaisie.git
synced 2024-12-17 22:13:47 +01:00
- LSldapObject :
-> Suppression des constructeurs inutiles dans les classes filles. -> Methode listObjectName() : rustine pour gérer l'utili- sation des subDnNames dans les LSformats. Ceci devra être corrigé lors de la creation de LSsearch.
This commit is contained in:
parent
505268a227
commit
713cccedb1
4 changed files with 15 additions and 66 deletions
|
@ -55,23 +55,18 @@ class LSldapObject {
|
|||
*
|
||||
* @author Benjamin Renard <brenard@easter-eggs.com>
|
||||
*
|
||||
* @param[in] $type_name [<b>required</b>] 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']);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -26,23 +26,7 @@
|
|||
* @author Benjamin Renard <brenard@easter-eggs.com>
|
||||
*/
|
||||
class LSeecompany extends LSldapObject {
|
||||
|
||||
/**
|
||||
* Constructeur
|
||||
*
|
||||
* Cette methode construit l'objet et définis la configuration.
|
||||
*
|
||||
* @author Benjamin Renard <brenard@easter-eggs.com>
|
||||
*
|
||||
* @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);
|
||||
}
|
||||
// ~
|
||||
}
|
||||
|
||||
?>
|
||||
|
|
|
@ -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 <brenard@easter-eggs.com>
|
||||
*
|
||||
* @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
|
||||
|
|
|
@ -26,23 +26,7 @@
|
|||
* @author Benjamin Renard <brenard@easter-eggs.com>
|
||||
*/
|
||||
class LSeepeople extends LSldapObject {
|
||||
|
||||
/**
|
||||
* Constructeur
|
||||
*
|
||||
* Cette methode construit l'objet et définis la configuration.
|
||||
*
|
||||
* @author Benjamin Renard <brenard@easter-eggs.com>
|
||||
*
|
||||
* @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);
|
||||
}
|
||||
// ~
|
||||
}
|
||||
|
||||
?>
|
||||
|
|
Loading…
Reference in a new issue