mirror of
https://gitlab.easter-eggs.com/ee/ldapsaisie.git
synced 2024-11-18 00:09:06 +01:00
LSsearch: remove buggy _hash cache parameter and replace it by an hash accessible key
This commit is contained in:
parent
7c8fb87c99
commit
11c2e3c9d4
1 changed files with 5 additions and 9 deletions
|
@ -70,9 +70,6 @@ class LSsearch extends LSlog_staticLoggerClass {
|
|||
// The cache of search parameters
|
||||
private $_searchParams = NULL;
|
||||
|
||||
// The cache of the hash of the search parameters
|
||||
private $_hash = NULL;
|
||||
|
||||
// The result of the search
|
||||
private $result=NULL;
|
||||
|
||||
|
@ -744,9 +741,6 @@ class LSsearch extends LSlog_staticLoggerClass {
|
|||
* @retval void
|
||||
**/
|
||||
private function generateSearchParams() {
|
||||
// Purge the cache of the hash
|
||||
$this -> _hash = NULL;
|
||||
|
||||
// Base
|
||||
$retval = array(
|
||||
'filter' => $this -> params['filter'],
|
||||
|
@ -984,10 +978,9 @@ class LSsearch extends LSlog_staticLoggerClass {
|
|||
public function getHash($searchParams=null) {
|
||||
if(is_null($searchParams)) {
|
||||
$searchParams=$this -> _searchParams;
|
||||
if ($this -> _hash) {
|
||||
return $this -> _hash;
|
||||
}
|
||||
}
|
||||
if (!$searchParams)
|
||||
return false;
|
||||
if ($searchParams['filter'] instanceof Net_LDAP_Filter) {
|
||||
$searchParams['filter']=$searchParams['filter']->asString();
|
||||
}
|
||||
|
@ -1195,6 +1188,9 @@ class LSsearch extends LSlog_staticLoggerClass {
|
|||
return $ret;
|
||||
}
|
||||
}
|
||||
elseif ($key == 'hash') {
|
||||
return $this -> getHash();
|
||||
}
|
||||
else {
|
||||
throw new Exception('Incorrect property !');
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue