Bugzilla – Attachment 121488 Details for
Bug 28409
Category should be validated in opac-shelves.pl
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 28409: Simplify data validation
Bug-28409-Simplify-data-validation.patch (text/plain), 1.98 KB, created by
Kyle M Hall (khall)
on 2021-05-28 14:41:30 UTC
(
hide
)
Description:
Bug 28409: Simplify data validation
Filename:
MIME Type:
Creator:
Kyle M Hall (khall)
Created:
2021-05-28 14:41:30 UTC
Size:
1.98 KB
patch
obsolete
>From 063fee9c5d04089ce9a2dacdfe468cddc3264c7c Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Fri, 21 May 2021 09:09:53 +0200 >Subject: [PATCH] Bug 28409: Simplify data validation > >Simplify the affectation then trust it. > >Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net> > >JD Amended patch: remove duplicate comma > >Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> >--- > opac/opac-shelves.pl | 12 +++--------- > 1 file changed, 3 insertions(+), 9 deletions(-) > >diff --git a/opac/opac-shelves.pl b/opac/opac-shelves.pl >index e3b167799d..0ec193c9ec 100755 >--- a/opac/opac-shelves.pl >+++ b/opac/opac-shelves.pl >@@ -80,13 +80,7 @@ if (C4::Context->preference("BakerTaylorEnabled")) { > > my $referer = $query->param('referer') || $op; > my $category = 1; >-if ( $query->param('category') && ( >- ($query->param('category') == 1) || >- ($query->param('category') == 2) >- ) >- ){ >- $category = $query->param('category'); >-} >+$category = 2 if $query->param('category') && $query->param('category') == 2; > > my ( $shelf, $shelfnumber, @messages ); > >@@ -115,7 +109,7 @@ if ( $op eq 'add_form' ) { > $shelf = Koha::Virtualshelf->new( > { shelfname => scalar $query->param('shelfname'), > sortfield => scalar $query->param('sortfield'), >- category => $category || 1, >+ category => $category, > allow_change_from_owner => $allow_changes_from > 0, > allow_change_from_others => $allow_changes_from == ANYONE, > owner => scalar $loggedinuser, >@@ -442,7 +436,7 @@ $template->param( > referer => $referer, > shelf => $shelf, > messages => \@messages, >- category => ($category == 1 || $category == 2) ? $category : "", >+ category => $category, > print => scalar $query->param('print') || 0, > listsview => 1, > ); >-- >2.30.1 (Apple Git-130)
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 28409
:
121267
|
121268
|
121281
|
121282
|
121308
|
121487
| 121488 |
122358
|
122359