Bugzilla – Attachment 172231 Details for
Bug 34631
Independentbranches - Non-superuser should not be able to write Additional contents for other branches
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 34631: (Follow up) Changed variable name
Bug-34631-Follow-up-Changed-variable-name.patch (text/plain), 4.26 KB, created by
Sukhmandeep
on 2024-09-30 16:25:02 UTC
(
hide
)
Description:
Bug 34631: (Follow up) Changed variable name
Filename:
MIME Type:
Creator:
Sukhmandeep
Created:
2024-09-30 16:25:02 UTC
Size:
4.26 KB
patch
obsolete
>From bbb406422bbd6ec8e913406e85a65bb2e92da1f0 Mon Sep 17 00:00:00 2001 >From: Sukhmandeep Benipal <sukhmandeep.benipal@inLibro.com> >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. >--- > .../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 b7dca5c3b1..69592b0259 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 >@@ -237,7 +237,7 @@ > </select> > [% INCLUDE 'html-customization-help.inc' %] > </li> >- [% UNLESS my_branch %] >+ [% UNLESS my_branch_as_staff %] > <li> > <label for="branchcode">Library: </label> > <select id="branchcode" name="branchcode"> >@@ -404,7 +404,7 @@ > [% SET default_localization = c.default_localization %] > [% IF ( c.is_expired ) %]<tr class="expired">[% ELSE %]<tr>[% END %] > <td> >- [% UNLESS ( my_branch && my_branch != c.branchcode ) %] >+ [% UNLESS ( my_branch_as_staff && my_branch_as_staff != c.branchcode ) %] > <input type="checkbox" name="ids" value="[% c.id | html %]" /> > [% END %] > </td> >@@ -465,7 +465,7 @@ > </div> > </td> > <td class="actions"> >- [% UNLESS ( my_branch && my_branch != c.branchcode ) %] >+ [% UNLESS ( my_branch_as_staff && my_branch_as_staff != c.branchcode ) %] > <div class="btn-group dropup"> > <a href="/cgi-bin/koha/tools/additional-contents.pl?op=add_form&id=[% c.id | uri %]&editmode=[% editmode | uri %]" class="btn btn-default btn-xs"> <i class="fa-solid fa-pencil"></i> Edit</a><button class="btn btn-default btn-xs dropdown-toggle" data-bs-toggle="dropdown" aria-expanded="false"> > >diff --git a/tools/additional-contents.pl b/tools/additional-contents.pl >index 9e7f6287fa..d6f699ab11 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, > ); >@@ -86,7 +86,7 @@ elsif ( $op eq 'cud-add_validate' ) { > 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'); > >@@ -229,7 +229,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
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 34631
:
154889
|
154890
|
162787
|
162788
|
162856
|
162929
|
162972
|
162995
| 172231