mirror of
https://gitlab.easter-eggs.com/ee/ldapsaisie.git
synced 2024-12-18 22:43:47 +01:00
LSsearch -> setParams() : Fixed Notice PHP
This commit is contained in:
parent
7ef44445c6
commit
2c100bc9e5
1 changed files with 9 additions and 9 deletions
|
@ -240,7 +240,7 @@ class LSsearch {
|
||||||
$OK=true;
|
$OK=true;
|
||||||
|
|
||||||
// Filter
|
// Filter
|
||||||
if (is_string($params['filter'])) {
|
if (isset($params['filter']) && is_string($params['filter'])) {
|
||||||
$filter = Net_LDAP2_Filter::parse($params['filter']);
|
$filter = Net_LDAP2_Filter::parse($params['filter']);
|
||||||
if (!LSerror::isLdapError($filter)) {
|
if (!LSerror::isLdapError($filter)) {
|
||||||
$this -> params['filter'] = $filter;
|
$this -> params['filter'] = $filter;
|
||||||
|
@ -281,7 +281,7 @@ class LSsearch {
|
||||||
$this -> params['pattern'] = NULL;
|
$this -> params['pattern'] = NULL;
|
||||||
$this -> params['filter'] = NULL;
|
$this -> params['filter'] = NULL;
|
||||||
}
|
}
|
||||||
elseif (self :: isValidPattern($params['pattern'])) {
|
elseif (isset($params['pattern']) && self :: isValidPattern($params['pattern'])) {
|
||||||
$this -> params['pattern'] = $params['pattern'];
|
$this -> params['pattern'] = $params['pattern'];
|
||||||
if (!is_string($params['filter'])) {
|
if (!is_string($params['filter'])) {
|
||||||
$this -> params['filter']=NULL;
|
$this -> params['filter']=NULL;
|
||||||
|
@ -290,7 +290,7 @@ class LSsearch {
|
||||||
|
|
||||||
|
|
||||||
// BaseDN
|
// BaseDN
|
||||||
if (is_string($params['basedn'])) {
|
if (isset($params['basedn']) && is_string($params['basedn'])) {
|
||||||
if (isCompatibleDNs(LSsession :: getRootDn(),$params['basedn'])) {
|
if (isCompatibleDNs(LSsession :: getRootDn(),$params['basedn'])) {
|
||||||
$this -> params['basedn'] = $params['basedn'];
|
$this -> params['basedn'] = $params['basedn'];
|
||||||
}
|
}
|
||||||
|
@ -301,7 +301,7 @@ class LSsearch {
|
||||||
}
|
}
|
||||||
|
|
||||||
// subDn
|
// subDn
|
||||||
if (is_string($params['subDn'])) {
|
if (isset($params['subDn']) && is_string($params['subDn'])) {
|
||||||
if (LSsession :: validSubDnLdapServer($params['subDn'])) {
|
if (LSsession :: validSubDnLdapServer($params['subDn'])) {
|
||||||
$this -> params['subDn'] = $params['subDn'];
|
$this -> params['subDn'] = $params['subDn'];
|
||||||
}
|
}
|
||||||
|
@ -312,7 +312,7 @@ class LSsearch {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Scope
|
// Scope
|
||||||
if (is_string($params['scope'])) {
|
if (isset($params['scope']) && is_string($params['scope'])) {
|
||||||
if (in_array($params['scope'],array('sub','one','base'))) {
|
if (in_array($params['scope'],array('sub','one','base'))) {
|
||||||
$this -> params['scope'] = $params['scope'];
|
$this -> params['scope'] = $params['scope'];
|
||||||
}
|
}
|
||||||
|
@ -348,7 +348,7 @@ class LSsearch {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Sort Direction
|
// Sort Direction
|
||||||
if (is_string($params['sortDirection'])) {
|
if (isset($params['sortDirection']) && is_string($params['sortDirection'])) {
|
||||||
if (in_array($params['sortDirection'],array('ASC','DESC'))) {
|
if (in_array($params['sortDirection'],array('ASC','DESC'))) {
|
||||||
$this -> params['sortDirection'] = $params['sortDirection'];
|
$this -> params['sortDirection'] = $params['sortDirection'];
|
||||||
}
|
}
|
||||||
|
@ -359,7 +359,7 @@ class LSsearch {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Sort By
|
// Sort By
|
||||||
if (is_string($params['sortBy'])) {
|
if (isset($params['sortBy']) && is_string($params['sortBy'])) {
|
||||||
if (in_array($params['sortBy'],array('displayName','subDn'))) {
|
if (in_array($params['sortBy'],array('displayName','subDn'))) {
|
||||||
if ($this -> params['sortBy'] == $params['sortBy']) {
|
if ($this -> params['sortBy'] == $params['sortBy']) {
|
||||||
$this -> toggleSortDirection();
|
$this -> toggleSortDirection();
|
||||||
|
@ -470,12 +470,12 @@ class LSsearch {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Display Format
|
// Display Format
|
||||||
if (is_string($params['displayFormat'])) {
|
if (isset($params['displayFormat']) && is_string($params['displayFormat'])) {
|
||||||
$this -> params['displayFormat'] = $params['displayFormat'];
|
$this -> params['displayFormat'] = $params['displayFormat'];
|
||||||
}
|
}
|
||||||
|
|
||||||
// Custom Infos
|
// Custom Infos
|
||||||
if (is_array($params['customInfos'])) {
|
if (isset($params['customInfos']) && is_array($params['customInfos'])) {
|
||||||
foreach($params['customInfos'] as $name => $data) {
|
foreach($params['customInfos'] as $name => $data) {
|
||||||
if(is_array($data['function']) && is_string($data['function'][0])) {
|
if(is_array($data['function']) && is_string($data['function'][0])) {
|
||||||
LSsession::loadLSclass($data['function'][0]);
|
LSsession::loadLSclass($data['function'][0]);
|
||||||
|
|
Loading…
Reference in a new issue