From 890a3ed43f29d11802190e96d3c1b738cdd37d17 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 --- tools/overduerules.pl | 12 +++++++----- 1 files changed, 7 insertions(+), 5 deletions(-) diff --git a/tools/overduerules.pl b/tools/overduerules.pl index b844a9a..c745861 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{}; -- 1.7.2.5