From 52160545a033d131c67b05389375d9eb2c6b9afa Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Mon, 6 Apr 2020 11:44:18 +0200 Subject: [PATCH] Bug 24964: [19.11.x] Do not fetch all patrons for owner/users of funds admin/add_user_search.pl sets 'patrons_with_acq_perm_only', to only retrieve patrons with acq (order_manage) permissions. The original bug was hidden in the existing code, but the behavior was terrible. To prevent patrons matching the permissions contrainst to be hidden, we fetched ALL the patrons from the DB, then filtered them depending on their permissions. This might have awful performance on DB with lot of patrons. So basically with this patch we are adding the pagination back to the "owner/users for funds" feature, as the permission filtering is now done at DB level. --- .../intranet-tmpl/prog/en/modules/common/patron_search.tt | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/common/patron_search.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/common/patron_search.tt index 54f9899353..d66c52686a 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/common/patron_search.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/common/patron_search.tt @@ -192,12 +192,8 @@ [% END %] ], 'bAutoWidth': false, - [% IF patrons_with_acq_perm_only %] - 'bPaginate': false, - [% ELSE %] - 'sPaginationType': 'full_numbers', - "iDisplayLength": [% Koha.Preference('PatronsPerPage') | html %], - [% END %] + 'sPaginationType': 'full_numbers', + "iDisplayLength": [% Koha.Preference('PatronsPerPage') | html %], 'aaSorting': [[[% aaSorting || 0 | html %], 'asc']], 'bFilter': false, 'bProcessing': true, -- 2.20.1