Bugzilla – Attachment 154041 Details for
Bug 32748
Library limitations will cause data loss when editing items
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 32748: (follow-up) Perltidy
Bug-32748-follow-up-Perltidy.patch (text/plain), 2.90 KB, created by
Katrin Fischer
on 2023-07-28 14:09:11 UTC
(
hide
)
Description:
Bug 32748: (follow-up) Perltidy
Filename:
MIME Type:
Creator:
Katrin Fischer
Created:
2023-07-28 14:09:11 UTC
Size:
2.90 KB
patch
obsolete
>From 50bbbf3a489baeb095f7c3c419efd11973f8f24b Mon Sep 17 00:00:00 2001 >From: Katrin Fischer <katrin.fischer@bsz-bw.de> >Date: Fri, 28 Jul 2023 12:20:05 +0000 >Subject: [PATCH] Bug 32748: (follow-up) Perltidy > >--- > C4/Koha.pm | 9 ++++++--- > Koha/UI/Form/Builder/Item.pm | 22 +++++++++------------- > 2 files changed, 15 insertions(+), 16 deletions(-) > >diff --git a/C4/Koha.pm b/C4/Koha.pm >index 9049c4e9de..49f0df55b6 100644 >--- a/C4/Koha.pm >+++ b/C4/Koha.pm >@@ -503,10 +503,11 @@ sub GetAuthorisedValues { > my $dbh = C4::Context->dbh; > my $select_clause = 'SELECT av.*'; > my @where_args; >- if ($branch_limit && $no_limit) { >+ if ( $branch_limit && $no_limit ) { > $select_clause .= ', IF (branchcode = ? OR branchcode IS NULL, 0, 1) as restricted'; > push @where_args, $branch_limit; > } >+ > my $query = qq{ > $select_clause > FROM authorised_values av >@@ -519,10 +520,12 @@ sub GetAuthorisedValues { > push @where_strings, "category = ?"; > push @where_args, $category; > } >- if($branch_limit && !defined $no_limit) { >+ >+ if ( $branch_limit && !defined $no_limit ) { > push @where_strings, "( branchcode = ? OR branchcode IS NULL )"; >- push @where_args, $branch_limit; >+ push @where_args, $branch_limit; > } >+ > if(@where_strings > 0) { > $query .= " WHERE " . join(" AND ", @where_strings); > } >diff --git a/Koha/UI/Form/Builder/Item.pm b/Koha/UI/Form/Builder/Item.pm >index 180b6f8ba6..7c13a4a48d 100644 >--- a/Koha/UI/Form/Builder/Item.pm >+++ b/Koha/UI/Form/Builder/Item.pm >@@ -277,24 +277,20 @@ sub generate_subfield_form { > } > else { > $subfield_data{marc_value} = { >- type => 'select', >- id => "tag_" >- . $tag >- . "_subfield_" >- . $subfieldtag . "_" >- . $index_subfield, >- values => \@authorised_values, >- labels => \%authorised_lib, >+ type => 'select', >+ id => "tag_" . $tag . "_subfield_" . $subfieldtag . "_" . $index_subfield, >+ values => \@authorised_values, >+ labels => \%authorised_lib, > restricted => \%authorised_restricted, >- default => $value, >+ default => $value, > ( >- ( >- grep { $_ eq $subfield->{authorised_value} } >- (qw(branches itemtypes cn_source)) >- ) ? () : ( category => $subfield->{authorised_value} ) >+ ( grep { $_ eq $subfield->{authorised_value} } (qw(branches itemtypes cn_source)) ) >+ ? () >+ : ( category => $subfield->{authorised_value} ) > ), > }; > } >+ > } > > # it's a thesaurus / authority field >-- >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 32748
:
148409
|
148491
|
150155
|
151989
|
154039
|
154040
| 154041 |
154042