From 7c8fb87c993a85773a15791d32b56352a0635cd1 Mon Sep 17 00:00:00 2001 From: Benjamin Renard Date: Mon, 24 Aug 2020 16:14:16 +0200 Subject: [PATCH] LSsearchEntry: remove useless $hash private property --- src/includes/class/class.LSsearch.php | 32 +++++++++++++++++----- src/includes/class/class.LSsearchEntry.php | 6 +--- 2 files changed, 26 insertions(+), 12 deletions(-) diff --git a/src/includes/class/class.LSsearch.php b/src/includes/class/class.LSsearch.php index 0757b645..d47f8d81 100644 --- a/src/includes/class/class.LSsearch.php +++ b/src/includes/class/class.LSsearch.php @@ -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; } } diff --git a/src/includes/class/class.LSsearchEntry.php b/src/includes/class/class.LSsearchEntry.php index a4199cc9..9a02f3af 100644 --- a/src/includes/class/class.LSsearchEntry.php +++ b/src/includes/class/class.LSsearchEntry.php @@ -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; }