Bug 29908: Remove warning when empty ClaimReturnedWarningThreshold in patron_messages.inc
System preference ClaimReturnedWarningThreshold manages the display of a patron message in case of too many claims.
But this preference may be empty. It is created empty in installer/data/mysql/mandatory/sysprefs.sql.
This generates a warning :
Argument "" isn't numeric in numeric gt (>) at /kohadevbox/koha/koha-tmpl/intranet-tmpl/prog/en/includes/patron_messages.inc line 128.
Test plan :
1) Set systempreference 'ClaimReturnedWarningThreshold' empty
2) Go to a patron details page
3) Check there is no warning in logs
4) Go to a patron check-out page
5) Check there is no warning in logs
6) Set systempreference 'ClaimReturnedWarningThreshold' with an integer (ie 5)
Repeat from 2)
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 27230e64ad)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
This commit is contained in:
parent
eec7e9ea48
commit
86f3a33a2c
|
|
@ -1,7 +1,7 @@
|
|||
[% USE raw %]
|
||||
[% USE Branches %]
|
||||
[% USE Categories %]
|
||||
[% SET ClaimReturnedWarningThreshold = Koha.Preference('ClaimReturnedWarningThreshold') %]
|
||||
[% SET ClaimReturnedWarningThreshold = Koha.Preference('ClaimReturnedWarningThreshold') || 0 %]
|
||||
[% SET return_claims = patron.return_claims %]
|
||||
[% SET logged_in_branchcode = Branches.GetLoggedInBranchcode() %]
|
||||
|
||||
|
|
|
|||
|
|
@ -1087,7 +1087,7 @@
|
|||
var ClaimReturnedLostValue = "[% Koha.Preference('ClaimReturnedLostValue') | html %]";
|
||||
var ClaimReturnedChargeFee = "[% Koha.Preference('ClaimReturnedChargeFee') | html %]";
|
||||
var UnseenRenewals = "[% Koha.Preference('UnseenRenewals') | html %]";
|
||||
var ClaimReturnedWarningThreshold = "[% Koha.Preference('ClaimReturnedWarningThreshold') | html %]";
|
||||
var ClaimReturnedWarningThreshold = "[% Koha.Preference('ClaimReturnedWarningThreshold') || 0 | html %]";
|
||||
var interface = "[% interface | html %]";
|
||||
var theme = "[% theme | html %]";
|
||||
var borrowernumber = "[% patron.borrowernumber | html %]";
|
||||
|
|
|
|||
|
|
@ -767,7 +767,7 @@
|
|||
var logged_in_user_borrowernumber = "[% logged_in_user.borrowernumber | html %]";
|
||||
var ClaimReturnedLostValue = "[% Koha.Preference('ClaimReturnedLostValue') | html %]";
|
||||
var ClaimReturnedChargeFee = "[% Koha.Preference('ClaimReturnedChargeFee') | html %]";
|
||||
var ClaimReturnedWarningThreshold = "[% Koha.Preference('ClaimReturnedWarningThreshold') | html %]";
|
||||
var ClaimReturnedWarningThreshold = "[% Koha.Preference('ClaimReturnedWarningThreshold') || 0 | html %]";
|
||||
var UnseenRenewals = "[% Koha.Preference('UnseenRenewals') | html %]";
|
||||
var interface = "[% interface | html %]";
|
||||
var theme = "[% theme | html %]";
|
||||
|
|
|
|||
Loading…
Reference in New Issue