mirror of
https://gitlab.easter-eggs.com/ee/ldapsaisie.git
synced 2024-12-18 22:43:47 +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
|
// The cache of search parameters
|
||||||
private $_searchParams = NULL;
|
private $_searchParams = NULL;
|
||||||
|
|
||||||
// The cache of the hash of the search parameters
|
|
||||||
private $_hash = NULL;
|
|
||||||
|
|
||||||
// The result of the search
|
// The result of the search
|
||||||
private $result=NULL;
|
private $result=NULL;
|
||||||
|
|
||||||
|
@ -744,9 +741,6 @@ class LSsearch extends LSlog_staticLoggerClass {
|
||||||
* @retval void
|
* @retval void
|
||||||
**/
|
**/
|
||||||
private function generateSearchParams() {
|
private function generateSearchParams() {
|
||||||
// Purge the cache of the hash
|
|
||||||
$this -> _hash = NULL;
|
|
||||||
|
|
||||||
// Base
|
// Base
|
||||||
$retval = array(
|
$retval = array(
|
||||||
'filter' => $this -> params['filter'],
|
'filter' => $this -> params['filter'],
|
||||||
|
@ -984,10 +978,9 @@ class LSsearch extends LSlog_staticLoggerClass {
|
||||||
public function getHash($searchParams=null) {
|
public function getHash($searchParams=null) {
|
||||||
if(is_null($searchParams)) {
|
if(is_null($searchParams)) {
|
||||||
$searchParams=$this -> _searchParams;
|
$searchParams=$this -> _searchParams;
|
||||||
if ($this -> _hash) {
|
|
||||||
return $this -> _hash;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
if (!$searchParams)
|
||||||
|
return false;
|
||||||
if ($searchParams['filter'] instanceof Net_LDAP_Filter) {
|
if ($searchParams['filter'] instanceof Net_LDAP_Filter) {
|
||||||
$searchParams['filter']=$searchParams['filter']->asString();
|
$searchParams['filter']=$searchParams['filter']->asString();
|
||||||
}
|
}
|
||||||
|
@ -1195,6 +1188,9 @@ class LSsearch extends LSlog_staticLoggerClass {
|
||||||
return $ret;
|
return $ret;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
elseif ($key == 'hash') {
|
||||||
|
return $this -> getHash();
|
||||||
|
}
|
||||||
else {
|
else {
|
||||||
throw new Exception('Incorrect property !');
|
throw new Exception('Incorrect property !');
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue