From c5c4c4770870b90bafa7cd7f1647a56f0ad55f57 Mon Sep 17 00:00:00 2001 From: Kyle M Hall Date: Wed, 22 Apr 2015 11:21:53 -0400 Subject: [PATCH] Bug 11747 [QA Followup] - Use system preference Signed-off-by: Jonathan Druart Signed-off-by: Kyle M Hall --- tools/overduerules.pl | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/tools/overduerules.pl b/tools/overduerules.pl index b844a9a28e..c7458611dd 100755 --- a/tools/overduerules.pl +++ b/tools/overduerules.pl @@ -72,12 +72,14 @@ my ( $template, $loggedinuser, $cookie ) = get_template_and_user( my $type = $input->param('type'); -my $branch = - defined( $input->param('branch') ) ? $input->param('branch') - : GetBranchesCount() == 1 ? undef - : C4::Branch::mybranch(); -$branch = q{} if $branch eq 'NO_LIBRARY_SET'; +my $branch = $input->param('branch'); +$branch = + defined $branch ? $branch + : C4::Context->preference('DefaultToLoggedInLibraryOverdueTriggers') ? C4::Branch::mybranch() + : GetBranchesCount() == 1 ? undef + : undef; $branch ||= q{}; +$branch = q{} if $branch eq 'NO_LIBRARY_SET'; my $op = $input->param('op'); $op ||= q{}; -- 2.39.5