LSsearchEntry: remove useless $hash private property

This commit is contained in:
Benjamin Renard 2020-08-24 16:14:16 +02:00
parent 70370f99f9
commit 7c8fb87c99
2 changed files with 26 additions and 12 deletions

View file

@ -1064,7 +1064,13 @@ class LSsearch extends LSlog_staticLoggerClass {
);
foreach ($list as $key => $id) {
$retval['list'][]=new LSsearchEntry($this,$this -> LSobject,$this -> params,$this -> _hash,$this -> result['list'],$id);
$retval['list'][] = new LSsearchEntry(
$this,
$this -> LSobject,
$this -> params,
$this -> result['list'],
$id
);
}
}
return $retval;
@ -1085,7 +1091,13 @@ class LSsearch extends LSlog_staticLoggerClass {
$sortTable=$this -> getSortTable();
foreach ($sortTable as $key => $id) {
$retval[]=new LSsearchEntry($this,$this -> LSobject,$this -> params,$this -> _hash,$this -> result['list'],$id);
$retval[] = new LSsearchEntry(
$this,
$this -> LSobject,
$this -> params,
$this -> result['list'],
$id
);
}
}
return $retval;
@ -1205,9 +1217,9 @@ class LSsearch extends LSlog_staticLoggerClass {
else {
$dir = -1;
}
$oa = new LSsearchEntry($this,$this -> LSobject,$this -> params,$this -> _hash,$this -> result['list'],$a);
$oa = new LSsearchEntry($this, $this -> LSobject, $this -> params, $this -> result['list'], $a);
$va = $oa->$sortBy;
$ob = new LSsearchEntry($this,$this -> LSobject,$this -> params,$this -> _hash,$this -> result['list'],$b);
$ob = new LSsearchEntry($this, $this -> LSobject, $this -> params, $this -> result['list'], $b);
$vb = $ob->$sortBy;
if ($va == $vb) return 0;
@ -1312,11 +1324,17 @@ class LSsearch extends LSlog_staticLoggerClass {
$retval=array();
if ($this -> total>0) {
$sortTable=$this -> getSortTable();
$sortTable = $this -> getSortTable();
foreach ($sortTable as $key => $id) {
$entry=new LSsearchEntry($this,$this -> LSobject,$this -> params,$this -> _hash,$this -> result['list'],$id);
$retval[$entry->dn]=$entry->displayName;
$entry = new LSsearchEntry(
$this,
$this -> LSobject,
$this -> params,
$this -> result['list'],
$id
);
$retval[$entry -> dn] = $entry -> displayName;
}
}

View file

@ -41,9 +41,6 @@ class LSsearchEntry extends LSlog_staticLoggerClass {
// The parameters of the search
private $params = array();
// The hash of the search parameters
private $hash = NULL;
// The attributes list
private $attrs_list=array();
@ -61,11 +58,10 @@ class LSsearchEntry extends LSlog_staticLoggerClass {
*
* @param[in] $LSobject string The LdapObject type of search
* @param[in] $params array Parameters of search
* @param[in] $hash array Parameters of search
* @param[in] $resultEntry array The data of the result entry
*
**/
public function __construct(&$LSsearch, $LSobject, $params, $hash, &$result, $id) {
public function __construct(&$LSsearch, $LSobject, $params, &$result, $id) {
if (!LSsession :: loadLSobject($LSobject)) {
return;
}