Bugzilla – Attachment 122743 Details for
Bug 28561
Order_by triggers a DBIx warning Unable to properly collapse has_many results
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 28561: Fix noisy warning about $direction too
Bug-28561-Fix-noisy-warning-about-direction-too.patch (text/plain), 1.57 KB, created by
Nick Clemens (kidclamp)
on 2021-07-09 13:19:15 UTC
(
hide
)
Description:
Bug 28561: Fix noisy warning about $direction too
Filename:
MIME Type:
Creator:
Nick Clemens (kidclamp)
Created:
2021-07-09 13:19:15 UTC
Size:
1.57 KB
patch
obsolete
>From 0d56ec9ce7575f080262707a6540d2cf930a1ff2 Mon Sep 17 00:00:00 2001 >From: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >Date: Mon, 14 Jun 2021 12:51:13 +0000 >Subject: [PATCH] Bug 28561: Fix noisy warning about $direction too > >Use of uninitialized value $direction in string ne at /usr/share/koha/opac/opac-shelves.pl line 265. > >Bonus: >Use of uninitialized value $sortfield in string eq at /usr/share/koha/opac/opac-shelves.pl line 264. > >Test plan: >While testing patch 1, check the logs for these warnings with and >without this patch. > >Signed-off-by: Nick Clemens <nick@bywatersolutions.com> >--- > opac/opac-shelves.pl | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > >diff --git a/opac/opac-shelves.pl b/opac/opac-shelves.pl >index e4405b055d..87de84acb3 100755 >--- a/opac/opac-shelves.pl >+++ b/opac/opac-shelves.pl >@@ -263,8 +263,8 @@ if ( $op eq 'view' ) { > $sortfield = $shelf->sortfield; > $direction = 'asc'; > } >- $sortfield = 'title' unless grep $_ eq $sortfield, qw( title author copyrightdate itemcallnumber dateadded ); >- $direction = 'asc' if $direction ne 'asc' and $direction ne 'desc'; >+ $sortfield = 'title' if !$sortfield or !grep { $_ eq $sortfield } qw( title author copyrightdate itemcallnumber dateadded ); >+ $direction = 'asc' if !$direction or ( $direction ne 'asc' and $direction ne 'desc' ); > my ( $page, $rows ); > unless ( $query->param('print') or $query->param('rss') ) { > $rows = C4::Context->preference('OPACnumSearchResults') || 20; >-- >2.20.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 28561
:
121912
|
121913
|
122119
|
122215
| 122743 |
122744