mirror of
https://gitlab.easter-eggs.com/ee/ldapsaisie.git
synced 2024-11-18 00:09:06 +01:00
Add ['NB_LSOBJECT_LIST_CHOICES'] parameter
This commit is contained in:
parent
25504c53ed
commit
278b084214
3 changed files with 15 additions and 1 deletions
|
@ -223,6 +223,16 @@ define('CONST2','val2')
|
||||||
</listitem>
|
</listitem>
|
||||||
</varlistentry>
|
</varlistentry>
|
||||||
|
|
||||||
|
<varlistentry>
|
||||||
|
<term>$GLOBALS['NB_LSOBJECT_LIST_CHOICES']</term>
|
||||||
|
<listitem>
|
||||||
|
<simpara>Variable permettant de configurer la liste des choix proposés à
|
||||||
|
l'utilisateur pour le nombre maximum d'objets affichés par page de résultat
|
||||||
|
de recherche.</simpara>
|
||||||
|
</listitem>
|
||||||
|
</varlistentry>
|
||||||
|
|
||||||
|
|
||||||
<varlistentry>
|
<varlistentry>
|
||||||
<term>MAX_SEND_FILE_SIZE</term>
|
<term>MAX_SEND_FILE_SIZE</term>
|
||||||
<listitem>
|
<listitem>
|
||||||
|
|
|
@ -213,6 +213,7 @@ $GLOBALS['LSlog']['enable'] = true;
|
||||||
|
|
||||||
define('NB_LSOBJECT_LIST',30);
|
define('NB_LSOBJECT_LIST',30);
|
||||||
define('NB_LSOBJECT_LIST_SELECT',11);
|
define('NB_LSOBJECT_LIST_SELECT',11);
|
||||||
|
$GLOBALS['NB_LSOBJECT_LIST_CHOICES'] = array(30, 60, 100);
|
||||||
|
|
||||||
define('MAX_SEND_FILE_SIZE',2000000);
|
define('MAX_SEND_FILE_SIZE',2000000);
|
||||||
|
|
||||||
|
|
|
@ -58,7 +58,7 @@ class LSsearch {
|
||||||
'displaySubDn' => NULL,
|
'displaySubDn' => NULL,
|
||||||
'displayFormat' => NULL,
|
'displayFormat' => NULL,
|
||||||
'nbObjectsByPage' => NB_LSOBJECT_LIST,
|
'nbObjectsByPage' => NB_LSOBJECT_LIST,
|
||||||
'nbObjectsByPageChoices' => array(25, 50, 75, 100),
|
'nbObjectsByPageChoices' => NULL,
|
||||||
'nbPageLinkByPage' => 10,
|
'nbPageLinkByPage' => 10,
|
||||||
'customInfos' => array(),
|
'customInfos' => array(),
|
||||||
'withoutCache' => false,
|
'withoutCache' => false,
|
||||||
|
@ -714,6 +714,9 @@ class LSsearch {
|
||||||
**/
|
**/
|
||||||
public function getParam($key) {
|
public function getParam($key) {
|
||||||
if(in_array($key,array_keys($this -> params))) {
|
if(in_array($key,array_keys($this -> params))) {
|
||||||
|
if ($key == 'nbObjectsByPageChoices' && !is_array($this -> params['nbObjectsByPageChoices'])) {
|
||||||
|
return (isset($GLOBALS['NB_LSOBJECT_LIST_CHOICES']) && is_array($GLOBALS['NB_LSOBJECT_LIST_CHOICES'])?$GLOBALS['NB_LSOBJECT_LIST_CHOICES']:range(NB_LSOBJECT_LIST, NB_LSOBJECT_LIST*4, NB_LSOBJECT_LIST));
|
||||||
|
}
|
||||||
return $this -> params[$key];
|
return $this -> params[$key];
|
||||||
}
|
}
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
Loading…
Reference in a new issue