From 3b71d9bb367004e855074c66de1b756904a65c94 Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Mon, 6 Apr 2020 11:44:18 +0200 Subject: [PATCH] Bug 24964: 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 f8dcf45440..b78ec9bd31 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 @@ -201,12 +201,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