From 8869713edcb7be61765aa1b41e8eb0bd028c5b6c Mon Sep 17 00:00:00 2001 From: Lucas Gass Date: Mon, 5 Oct 2020 17:42:29 +0000 Subject: [PATCH] Bug 23420: (QA follow-up) Remove more AllowPurchaseSuggestionBranchChoice code Test plan: 1. git grep -i AllowPurchaseSuggestionBranchChoice **/*.pm **/*.pl **/*.t 2. There should no longer be any code related to the old sys pref AllowPurchaseSuggestionBranchChoice --- C4/UsageStats.pm | 1 - opac/opac-suggestions.pl | 14 -------------- t/db_dependent/UsageStats.t | 1 - 3 files changed, 16 deletions(-) diff --git a/C4/UsageStats.pm b/C4/UsageStats.pm index 7aecc006da..6f9b27c20f 100644 --- a/C4/UsageStats.pm +++ b/C4/UsageStats.pm @@ -266,7 +266,6 @@ sub BuildReport { ShowReviewerPhoto SocialNetworks suggestion - AllowPurchaseSuggestionBranchChoice OpacAllowPublicListCreation OpacAllowSharingPrivateLists OpacRenewalAllowed diff --git a/opac/opac-suggestions.pl b/opac/opac-suggestions.pl index ab146ccf25..ae26ed3817 100755 --- a/opac/opac-suggestions.pl +++ b/opac/opac-suggestions.pl @@ -219,20 +219,6 @@ foreach my $suggestion(@$suggestions_loop) { my $patron_reason_loop = GetAuthorisedValues("OPAC_SUG"); -# Is the person allowed to choose their branch -if ( C4::Context->preference("AllowPurchaseSuggestionBranchChoice") ) { - my $branchcode = $input->param('branchcode') || q{}; - - if ( !$branchcode - && C4::Context->userenv - && C4::Context->userenv->{branch} ) - { - $branchcode = C4::Context->userenv->{branch}; - } - - $template->param( branchcode => $branchcode ); -} - my @mandatoryfields; { last unless ($op eq 'add'); diff --git a/t/db_dependent/UsageStats.t b/t/db_dependent/UsageStats.t index d31b51718a..a71b160ac6 100755 --- a/t/db_dependent/UsageStats.t +++ b/t/db_dependent/UsageStats.t @@ -527,7 +527,6 @@ sub mocking_systempreferences_to_a_set_value { ShowReviewerPhoto SocialNetworks suggestion - AllowPurchaseSuggestionBranchChoice OpacAllowPublicListCreation OpacAllowSharingPrivateLists OpacRenewalAllowed -- 2.11.0