mirror of
https://gitlab.easter-eggs.com/ee/ldapsaisie.git
synced 2024-11-22 18:09:06 +01:00
LSsearch :: setParams() : Fixed notice PHP
This commit is contained in:
parent
6792005de2
commit
aa218fce3b
1 changed files with 22 additions and 18 deletions
|
@ -240,19 +240,21 @@ class LSsearch {
|
||||||
$OK=true;
|
$OK=true;
|
||||||
|
|
||||||
// Filter
|
// Filter
|
||||||
if (isset($params['filter']) && is_string($params['filter'])) {
|
if (isset($params['filter'])) {
|
||||||
$filter = Net_LDAP2_Filter::parse($params['filter']);
|
if (is_string($params['filter'])) {
|
||||||
if (!LSerror::isLdapError($filter)) {
|
$filter = Net_LDAP2_Filter::parse($params['filter']);
|
||||||
$this -> params['filter'] = $filter;
|
if (!LSerror::isLdapError($filter)) {
|
||||||
|
$this -> params['filter'] = $filter;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
LSerror :: addErrorCode('LSsearch_01',$params['filter']);
|
||||||
|
$OK=false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else {
|
elseif($params['filter'] instanceof Net_LDAP2_Filter) {
|
||||||
LSerror :: addErrorCode('LSsearch_01',$params['filter']);
|
$this -> params['filter'] =& $params['filter'];
|
||||||
$OK=false;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
elseif($params['filter'] instanceof Net_LDAP2_Filter) {
|
|
||||||
$this -> params['filter'] =& $params['filter'];
|
|
||||||
}
|
|
||||||
|
|
||||||
// Approx
|
// Approx
|
||||||
if (isset($params['approx'])) {
|
if (isset($params['approx'])) {
|
||||||
|
@ -277,14 +279,16 @@ class LSsearch {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Patterm
|
// Patterm
|
||||||
if (isset($params['pattern']) && $params['pattern']=="") {
|
if (isset($params['pattern'])) {
|
||||||
$this -> params['pattern'] = NULL;
|
if ($params['pattern']=="") {
|
||||||
$this -> params['filter'] = NULL;
|
$this -> params['pattern'] = NULL;
|
||||||
}
|
$this -> params['filter'] = NULL;
|
||||||
elseif (isset($params['pattern']) && self :: isValidPattern($params['pattern'])) {
|
}
|
||||||
$this -> params['pattern'] = $params['pattern'];
|
elseif (self :: isValidPattern($params['pattern'])) {
|
||||||
if (!is_string($params['filter'])) {
|
$this -> params['pattern'] = $params['pattern'];
|
||||||
$this -> params['filter']=NULL;
|
if (!is_string($params['filter'])) {
|
||||||
|
$this -> params['filter']=NULL;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue