From 12dd182d261188cb354d8ee4db41b7c1a47a8295 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 dc8c850dbd..54dbc31c1b 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 ad2d90112c..be173ff9ce 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, ); @@ -85,7 +85,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'); @@ -233,7 +233,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