[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Noalyss-commit] [noalyss] 02/02: Fix : card search : no result display
From: |
dwm |
Subject: |
[Noalyss-commit] [noalyss] 02/02: Fix : card search : no result display if no limit for the result |
Date: |
Sat, 28 Sep 2024 07:51:04 -0400 (EDT) |
sparkyx pushed a commit to branch pre-stable
in repository noalyss.
commit 2b3ad77a0aa776ef81d62b0c08ed8025845bb4ad
Author: Dany wm <danydb@noalyss.eu>
AuthorDate: Fri Sep 27 19:47:35 2024 +0200
Fix : card search : no result display if no limit for the result
---
include/ajax/ajax_boxcard_search.php | 10 +++++++---
1 file changed, 7 insertions(+), 3 deletions(-)
diff --git a/include/ajax/ajax_boxcard_search.php
b/include/ajax/ajax_boxcard_search.php
index efa50424d..7a43781e9 100644
--- a/include/ajax/ajax_boxcard_search.php
+++ b/include/ajax/ajax_boxcard_search.php
@@ -39,13 +39,16 @@ $sql="
$preference=$g_user->get_preference();
$array=$cn->get_array($sql,array($_GET['card']));
echo HtmlInput::title_box(_("Résultat recherche"), "boxsearch_card_div");
-$max=(count($array)> $preference['PAGESIZE'])?
$preference['PAGESIZE']:count($array);
+
+$max=($preference['PAGESIZE'] > -1 && count($array)> $preference['PAGESIZE'])?
$preference['PAGESIZE']:count($array);
+
?>
-<?php if (count($array)>$preference['PAGESIZE'] ): ?>
+<?php if ( $preference['PAGESIZE'] > -1 &&
count($array)>$preference['PAGESIZE'] ): ?>
<h2 class="notice"><?php printf (_("Résultat limité à %d dans vos préférences,
%d fiches trouvées"), $preference['PAGESIZE'],count($array))?> </h2>
<?php endif?>
-<?php echo _('Cherche')?> <?php echo Icon_Action::infobulle(26);echo
HtmlInput::filter_table("tb_fiche", "0,1,2,3,4,5", 1); ?> :
+<?php echo _('Cherche')?> <?php echo Icon_Action::infobulle(26);echo
HtmlInput::filter_table("tb_fiche", "0,1,2,3,4,5", 1); ?>
+<div style="padding:2px">
<table id="tb_fiche" class="sorttable" style="width:100%">
<tr>
<th>
@@ -101,4 +104,5 @@ $max=(count($array)> $preference['PAGESIZE'])?
$preference['PAGESIZE']:count($ar
<?php endfor; ?>
</table>
+</div>
<?php echo HtmlInput::button_close("boxsearch_card_div")?>