Bugzilla – Attachment 136540 Details for
Bug 30327
Sort component parts
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 30327: Supply defaults if component sort fields not set
Bug-30327-Supply-defaults-if-component-sort-fields.patch (text/plain), 1.22 KB, created by
Nick Clemens (kidclamp)
on 2022-06-25 11:20:13 UTC
(
hide
)
Description:
Bug 30327: Supply defaults if component sort fields not set
Filename:
MIME Type:
Creator:
Nick Clemens (kidclamp)
Created:
2022-06-25 11:20:13 UTC
Size:
1.22 KB
patch
obsolete
>From 64d0672ebb94711a9810dd5511a002f9cc4b6d35 Mon Sep 17 00:00:00 2001 >From: Nick Clemens <nick@bywatersolutions.com> >Date: Sat, 25 Jun 2022 11:18:42 +0000 >Subject: [PATCH] Bug 30327: Supply defaults if component sort fields not set > >This patch fetches the new sysprefs into variables, providing default title ascending if >they are not set to avoid an undefined concatenation warning >--- > Koha/Biblio.pm | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) > >diff --git a/Koha/Biblio.pm b/Koha/Biblio.pm >index 52cc36f2d6..ea0c9d9f84 100644 >--- a/Koha/Biblio.pm >+++ b/Koha/Biblio.pm >@@ -565,7 +565,9 @@ sub get_components_query { > my $builder = Koha::SearchEngine::QueryBuilder->new( > { index => $Koha::SearchEngine::BIBLIOS_INDEX } ); > my $marc = $self->metadata->record; >- my $sort = C4::Context->preference('ComponentSortField') . "_" . C4::Context->preference('ComponentSortOrder'); >+ my $component_sort_field = C4::Context->preference('ComponentSortField') // "title"; >+ my $component_sort_order = C4::Context->preference('ComponentSortOrder') // "asc"; >+ my $sort = $component_sort_field . "_" . $component_sort_order; > > my $searchstr; > if ( C4::Context->preference('UseControlNumber') ) { >-- >2.30.2
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 30327
:
131998
|
135550
|
135551
|
135730
|
136256
|
136446
|
136447
|
136448
|
136540
|
136541
|
136542
|
136543
|
136544
|
141731