From 78d4303b687092768ce79c310d37e7dff2661f83 Mon Sep 17 00:00:00 2001 From: Sukhmandeep Benipal Date: Mon, 30 Sep 2024 12:17:46 -0400 Subject: [PATCH] Bug 34631: (Follow up) Changed variable name Same test plan as before just changed variable name for clarity. Signed-off-by: David Nind --- .../prog/en/modules/tools/additional-contents.tt | 6 +++--- tools/additional-contents.pl | 8 ++++---- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/additional-contents.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/additional-contents.tt index 4198ba19710..b4dac91fc43 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/additional-contents.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/additional-contents.tt @@ -234,7 +234,7 @@ [% INCLUDE 'html-customization-help.inc' %] - [% UNLESS my_branch %] + [% UNLESS my_branch_as_staff %]
  • [% END %] @@ -468,7 +468,7 @@ - [% UNLESS ( my_branch && my_branch != c.branchcode ) %] + [% UNLESS ( my_branch_as_staff && my_branch_as_staff != c.branchcode ) %]
    Edit diff --git a/tools/additional-contents.pl b/tools/additional-contents.pl index 222b0c6af17..97755aa70f8 100755 --- a/tools/additional-contents.pl +++ b/tools/additional-contents.pl @@ -63,7 +63,7 @@ my ( $template, $borrowernumber, $cookie ) = get_template_and_user( ); my @messages; -my $my_branch = +my $my_branch_as_staff = C4::Context->preference("IndependentBranches") && !C4::Context->IsSuperLibrarian() ? C4::Context->userenv()->{'branch'} @@ -77,7 +77,7 @@ if ( $op eq 'add_form' ) { $category = $additional_content->category; } $template->param( - my_branch => $my_branch, + my_branch_as_staff => $my_branch_as_staff, additional_content => $additional_content, translated_contents => $translated_contents, opac_available_options => Koha::AdditionalContents::get_html_customizations_options('opac'), @@ -87,7 +87,7 @@ if ( $op eq 'add_form' ) { output_and_exit_if_error( $cgi, $cookie, $template, { check => 'csrf_token' } ); my $location = $cgi->param('location'); my $code = $cgi->param('code'); - my $branchcode = $my_branch ? $my_branch : $cgi->param('branchcode') || undef; + my $branchcode = $my_branch_as_staff ? $my_branch_as_staff : $cgi->param('branchcode') || undef; my @lang = $cgi->multi_param('lang'); @@ -235,7 +235,7 @@ if ( $op eq 'list' ) { { category => $category, 'additional_contents_localizations.lang' => 'default' }, { order_by => { -desc => 'published_on' }, join => 'additional_contents_localizations' } ); - $template->param( additional_contents => $additional_contents, my_branch => $my_branch ); + $template->param( additional_contents => $additional_contents, my_branch_as_staff => $my_branch_as_staff ); } my $translated_languages = C4::Languages::getTranslatedLanguages(); -- 2.34.1