[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Noalyss-commit] [noalyss] 06/19: Limit search thanks user's preferences
From: |
dwm |
Subject: |
[Noalyss-commit] [noalyss] 06/19: Limit search thanks user's preferences |
Date: |
Sat, 31 Aug 2024 17:46:27 -0400 (EDT) |
sparkyx pushed a commit to branch pre-stable
in repository noalyss.
commit 631063b9a50fb9608ceb1794683417bf8d7df0f7
Author: sparkyx <danydb@noalyss.eu>
AuthorDate: Sat Aug 24 11:58:26 2024 +0200
Limit search thanks user's preferences
---
include/ajax/ajax_boxcard_search.php | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/include/ajax/ajax_boxcard_search.php
b/include/ajax/ajax_boxcard_search.php
index e8668f945..efa50424d 100644
--- a/include/ajax/ajax_boxcard_search.php
+++ b/include/ajax/ajax_boxcard_search.php
@@ -26,6 +26,7 @@
*
*/
if ( ! defined ('ALLOWED') ) die('Appel direct ne sont pas permis');
+global $g_user;
$sql="
select distinct
vw.f_id,vw_name,vw_first_name,vw_description,fd_label,quick_code,tva_num,(select
ad_value from fiche_Detail where f_id=pc.f_id and ad_id=5) as poste
from vw_fiche_attr as vw
@@ -35,12 +36,13 @@ $sql="
ad_value ~* $1
order by 2
";
+$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)>MAX_CARD_SEARCH)?MAX_CARD_SEARCH:count($array);
+$max=(count($array)> $preference['PAGESIZE'])?
$preference['PAGESIZE']:count($array);
?>
-<?php if (count($array)>MAX_CARD_SEARCH ): ?>
-<h2 class="notice"><?php printf (_("Résultat limité à %d , %d nombre de fiches
trouvées"), MAX_CARD_SEARCH,count($array))?> </h2>
+<?php if (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); ?> :
- [Noalyss-commit] [noalyss] branch pre-stable created (now ae29565cf), dwm, 2024/08/31
- [Noalyss-commit] [noalyss] 10/19: upgrade199 : Correct SQL, dwm, 2024/08/31
- [Noalyss-commit] [noalyss] 16/19: cosmetic, dwm, 2024/08/31
- [Noalyss-commit] [noalyss] 05/19: Typo, dwm, 2024/08/31
- [Noalyss-commit] [noalyss] 02/19: Bug : fix create event from AGENDA, dwm, 2024/08/31
- [Noalyss-commit] [noalyss] 07/19: Fix : error when empty, dwm, 2024/08/31
- [Noalyss-commit] [noalyss] 06/19: Limit search thanks user's preferences,
dwm <=
- [Noalyss-commit] [noalyss] 01/19: Merge branch 'unstable' of gitlab.com:noalyss/noalyss into unstable, dwm, 2024/08/31
- [Noalyss-commit] [noalyss] 08/19: set the search_path, dwm, 2024/08/31
- [Noalyss-commit] [noalyss] 09/19: Database : correct the scripts for creating DB and adapt to postgreSQL 12, dwm, 2024/08/31
- [Noalyss-commit] [noalyss] 11/19: set version 9.3, dwm, 2024/08/31
- [Noalyss-commit] [noalyss] 12/19: Task #2372 : Change AD, dwm, 2024/08/31
- [Noalyss-commit] [noalyss] 04/19: Cosmetic, dwm, 2024/08/31
- [Noalyss-commit] [noalyss] 03/19: GESTION : operation add receipt number, dwm, 2024/08/31
- [Noalyss-commit] [noalyss] 18/19: cosmetic, dwm, 2024/08/31
- [Noalyss-commit] [noalyss] 15/19: C0SEC : add a search for the table of users, dwm, 2024/08/31
- [Noalyss-commit] [noalyss] 19/19: cosmetic, dwm, 2024/08/31