Fix some PHP warnings

This commit is contained in:
Benjamin Renard 2021-02-23 20:03:04 +01:00
parent 3151721838
commit c9f63fa5e9
2 changed files with 4 additions and 3 deletions

View file

@ -566,6 +566,7 @@ class LSsearch extends LSlog_staticLoggerClass {
// Following parameters are allowed from request but need additional checks
'filter', 'basedn', 'subDn', 'scope', 'attributes', 'displayFormat',
);
$data = array();
foreach($_REQUEST as $key => $value) {
if (!in_array($key, $allowedParams))
@ -640,7 +641,7 @@ class LSsearch extends LSlog_staticLoggerClass {
}
}
return $this -> setParams($data);
return (empty($data)?true:$this -> setParams($data));
}
/**

View file

@ -65,7 +65,7 @@
{/if}
{if $LSsearch->extraDisplayedColumns}
{foreach from=$LSsearch->visibleExtraDisplayedColumns item=conf key=cid}
<th class='LSobject-list'{if $conf.cssStyle} style='{$conf.cssStyle|escape:"htmlall"}'{/if}>
<th class='LSobject-list'{if isset($conf.cssStyle) && $conf.cssStyle} style='{$conf.cssStyle|escape:"htmlall"}'{/if}>
{if $LSsearch->sort}
<a href='object/{$LSsearch->LSobject|escape:"url"}?sortBy={$cid|escape:"url"}&amp;nocache={$smarty.now}'>
{if $LSsearch->sortBy == $cid}
@ -89,7 +89,7 @@
{if $LSsearch->displaySubDn}<td class='LSobject-list'>{$object->subDn|escape:"htmlall"}</td>{/if}
{if $LSsearch->extraDisplayedColumns}
{foreach from=$LSsearch->visibleExtraDisplayedColumns item=conf key=cid}
<td class='LSobject-list'{if $conf.cssStyle} style='{$conf.cssStyle|escape:"htmlall"}'{/if}>{if !isset($conf.escape) || $conf.escape}{$object->$cid|escape:"htmlall"}{else}{$object->$cid}{/if}</td>
<td class='LSobject-list'{if isset($conf.cssStyle) && $conf.cssStyle} style='{$conf.cssStyle|escape:"htmlall"}'{/if}>{if !isset($conf.escape) || $conf.escape}{$object->$cid|escape:"htmlall"}{else}{$object->$cid}{/if}</td>
{/foreach}
{/if}
<td class='LSobject-list LSobject-list-actions'>