mirror of
https://gitlab.easter-eggs.com/ee/ldapsaisie.git
synced 2024-11-22 09:59:06 +01:00
API: add keepParamsBetweenSearches on LSobject search
This commit is contained in:
parent
36eae85bc3
commit
0360ab7951
3 changed files with 19 additions and 2 deletions
|
@ -221,6 +221,13 @@
|
|||
<listitem><simpara>Booléen permettant de désactiver l'utilisation du cache. Les valeurs acceptées
|
||||
sont <literal>1</literal> ou <literal>0</literal>.</simpara></listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term>keepParamsBetweenSearches</term>
|
||||
<listitem><simpara>Booléen permettant d'activer/désactiver le stockage en session des paramètres de
|
||||
recherche (optionel, par défaut : <literal>Faux</literal>). Les valeurs acceptées sont
|
||||
<literal>1</literal> ou <literal>0</literal>.</simpara></listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</para>
|
||||
<programlisting linenumbering="unnumbered">
|
||||
|
|
|
@ -1569,7 +1569,17 @@ function handle_api_LSobject_search($request) {
|
|||
}
|
||||
|
||||
// Instanciate a LSsearch
|
||||
$search = new LSsearch($LSobject, 'api', null, isset($_REQUEST['reset']));
|
||||
$keepParamsBetweenSearches = (
|
||||
isset($_REQUEST['keepParamsBetweenSearches'])?
|
||||
boolval($_REQUEST['keepParamsBetweenSearches']):
|
||||
false
|
||||
);
|
||||
$search = new LSsearch(
|
||||
$LSobject,
|
||||
'api',
|
||||
null,
|
||||
!$keepParamsBetweenSearches
|
||||
);
|
||||
$search -> setParam('onlyAccessible', True);
|
||||
if (!$search -> setParamsFromRequest()) {
|
||||
LSsession :: displayAjaxReturn();
|
||||
|
|
Loading…
Reference in a new issue