mirror of
https://gitlab.easter-eggs.com/ee/ldapsaisie.git
synced 2024-11-23 02:19:07 +01:00
- LSselect && LSattr_html_select_object : Optimisation des recherches en utilisant
LSldapObject :: listObjectsName()
This commit is contained in:
parent
77bfd98a32
commit
4dca97074b
2 changed files with 11 additions and 11 deletions
|
@ -159,10 +159,10 @@ class LSattr_html_select_object extends LSattr_html{
|
||||||
if ($filter!='') {
|
if ($filter!='') {
|
||||||
$filter='(|'.$filter.')';
|
$filter='(|'.$filter.')';
|
||||||
$obj = new $conf['object_type']();
|
$obj = new $conf['object_type']();
|
||||||
$listobj = $obj -> listObjects($filter);
|
$listobj = $obj -> listObjectsName($filter,NULL,array(),$conf['display_attribute']);
|
||||||
foreach($listobj as $one) {
|
foreach($listobj as $dn => $name) {
|
||||||
$DNs[]=$one -> getDn();
|
$DNs[]=$dn;
|
||||||
$retInfos[$one -> getDn()] = $one -> getDisplayValue($conf['display_attribute']);
|
$retInfos[$dn] = $name;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -202,31 +202,31 @@ if($LSsession -> startLSsession()) {
|
||||||
'action' => 'refresh'
|
'action' => 'refresh'
|
||||||
);
|
);
|
||||||
|
|
||||||
$list=$object -> listObjects($filter,$topDn,$params);
|
$list=$object -> listObjectsName($filter,$topDn,$params);
|
||||||
$nbObjects=count($list);
|
$nbObjects=count($list);
|
||||||
$searchData['LSobject_list_nbresult']=$nbObjects;
|
$searchData['LSobject_list_nbresult']=$nbObjects;
|
||||||
|
|
||||||
$c=0;
|
$c=0;
|
||||||
|
|
||||||
foreach($list as $thisObject) {
|
foreach($list as $objDn => $objName) {
|
||||||
if ($GLOBALS['LSsession'] -> canAccess($LSobject,$thisObject->getValue('dn'))) {
|
if ($GLOBALS['LSsession'] -> canAccess($LSobject,$objDn)) {
|
||||||
|
|
||||||
$c++;
|
$c++;
|
||||||
unset($actions);
|
unset($actions);
|
||||||
|
|
||||||
$subDn_name=false;
|
$subDn_name=false;
|
||||||
if ($doSubDn) {
|
if ($doSubDn) {
|
||||||
$subDn_name = $thisObject -> getSubDnName();
|
$subDn_name = $object -> getSubDnName($objDn);
|
||||||
}
|
}
|
||||||
|
|
||||||
$objectList[]=array(
|
$objectList[]=array(
|
||||||
'dn' => $thisObject->getValue('dn'),
|
'dn' => $objDn,
|
||||||
'displayValue' => $thisObject->getDisplayValue(),
|
'displayValue' => $objName,
|
||||||
'subDn' => $subDn_name
|
'subDn' => $subDn_name
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
LSdebug($thisObject->getValue('dn'));
|
LSdebug($dn);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
$searchData['objectList']=$objectList;
|
$searchData['objectList']=$objectList;
|
||||||
|
|
Loading…
Reference in a new issue