Bugzilla – Attachment 189656 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: (QA follow-up) Fix spelling and tidy
Bug-32748-QA-follow-up-Fix-spelling-and-tidy.patch (text/plain), 5.74 KB, created by
Lisette Scheer
on 2025-11-18 02:56:47 UTC
(
hide
)
Description:
Bug 32748: (QA follow-up) Fix spelling and tidy
Filename:
MIME Type:
Creator:
Lisette Scheer
Created:
2025-11-18 02:56:47 UTC
Size:
5.74 KB
patch
obsolete
>From 04dc662eba4f467daf0b89e0a8fe00b1fa210283 Mon Sep 17 00:00:00 2001 >From: Lisette Scheer <lisette@bywatersolutions.com> >Date: Tue, 18 Nov 2025 02:47:21 +0000 >Subject: [PATCH] Bug 32748: (QA follow-up) Fix spelling and tidy > >--- > C4/Koha.pm | 12 ++++++------ > Koha/UI/Form/Builder/Item.pm | 8 ++++---- > .../intranet-tmpl/prog/en/includes/html_helpers.inc | 8 ++++++-- > 3 files changed, 16 insertions(+), 12 deletions(-) > >diff --git a/C4/Koha.pm b/C4/Koha.pm >index e6fe6e75d46..b0d025de195 100644 >--- a/C4/Koha.pm >+++ b/C4/Koha.pm >@@ -509,8 +509,8 @@ C<$opac> If set to a true value, displays OPAC descriptions rather than normal o > =cut > > sub GetAuthorisedValues { >- my $category = shift // ''; # optional parameter >- my $opac = shift ? 1 : 0; # normalise to be safe >+ my $category = shift // ''; # optional parameter >+ my $opac = shift ? 1 : 0; # normalise to be safe > my $options = shift // ''; > my $no_limit; > if ($options) { $no_limit = $options->{'no_limit'}; } #optional parameter to ignore library limitation >@@ -523,7 +523,7 @@ sub GetAuthorisedValues { > return $result if $result; > > my @results; >- my $dbh = C4::Context->dbh; >+ my $dbh = C4::Context->dbh; > > my $select_clause = 'SELECT av.*'; > my @where_args; >@@ -540,7 +540,7 @@ sub GetAuthorisedValues { > LEFT JOIN authorised_values_branches ON ( id = av_id ) > } if $branch_limit; > my @where_strings; >- if($category) { >+ if ($category) { > push @where_strings, "category = ?"; > push @where_args, $category; > } >@@ -550,8 +550,8 @@ sub GetAuthorisedValues { > push @where_args, $branch_limit; > } > >- if(@where_strings > 0) { >- $query .= " WHERE " . join(" AND ", @where_strings); >+ if ( @where_strings > 0 ) { >+ $query .= " WHERE " . join( " AND ", @where_strings ); > } > $query .= ' ORDER BY category, ' > . ( >diff --git a/Koha/UI/Form/Builder/Item.pm b/Koha/UI/Form/Builder/Item.pm >index 6a16e8317e4..35b50193989 100644 >--- a/Koha/UI/Form/Builder/Item.pm >+++ b/Koha/UI/Form/Builder/Item.pm >@@ -210,12 +210,12 @@ sub generate_subfield_form { > } else { > $filtered_itemtypes = $all_itemtypes; > } >- while (my $itemtype = $filtered_itemtypes->next) { >+ while ( my $itemtype = $filtered_itemtypes->next ) { > push @authorised_values, $itemtype->itemtype; > $authorised_lib{ $itemtype->itemtype } = $itemtype->translated_description; > } >- while (my $itemtype = $all_itemtypes->next) { >- if (!grep { $_ eq $itemtype->itemtype } @authorised_values) { >+ while ( my $itemtype = $all_itemtypes->next ) { >+ if ( !grep { $_ eq $itemtype->itemtype } @authorised_values ) { > $restricted_values{ $itemtype->itemtype } = $itemtype->translated_description; > } > } >@@ -255,7 +255,7 @@ sub generate_subfield_form { > my $av = GetAuthorisedValues( $subfield->{authorised_value}, undef, { 'no_limit' => 1 } ); > for my $r (@$av) { > push @authorised_values, $r->{authorised_value}; >- $authorised_lib{ $r->{authorised_value} } = $r->{lib}; >+ $authorised_lib{ $r->{authorised_value} } = $r->{lib}; > $restricted_values{ $r->{authorised_value} } = $r->{restricted}; > } > } >diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/html_helpers.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/html_helpers.inc >index 6515b51f4ab..cb299962b2d 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/includes/html_helpers.inc >+++ b/koha-tmpl/intranet-tmpl/prog/en/includes/html_helpers.inc >@@ -136,7 +136,9 @@ > [% IF aval == mv.default %] > [% SET matched = 1 %] > [% IF mv.restricted.$aval %] >- <option value="[%- aval | html -%]" selected="selected" style="float:right" title="This value ([%- mv.labels.$aval | html -%]) is limited to other librairies">[%- mv.labels.$aval | html -%] ⚠</option> >+ <option value="[%- aval | html -%]" selected="selected" style="float:right" title="This value ([%- mv.labels.$aval | html -%]) is limited to other libraries" >+ >[%- mv.labels.$aval | html -%] ⚠</option >+ > > [% ELSE %] > <option value="[%- aval | html -%]" selected="selected">[%- mv.labels.$aval | html -%]</option> > [% END %] >@@ -157,7 +159,9 @@ > [% IF mv.restricted %] > [% FOREACH code IN mv.restricted.keys %] > [% IF mv.default == code %] >- <option value="[%- code | html -%]" selected="selected" style="float:right" title="This value ([%- mv.restricted.$code | html -%]) is limited to other librairies">[%- mv.restricted.$code | html -%] ⚠</option> >+ <option value="[%- code | html -%]" selected="selected" style="float:right" title="This value ([%- mv.restricted.$code | html -%]) is limited to other libraries" >+ >[%- mv.restricted.$code | html -%] ⚠</option >+ > > [% END %] > [% END %] > [% END %] >-- >2.39.5
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
|
186006
|
186007
|
186008
|
186009
|
186303
|
186307
|
186308
|
186312
|
186313
|
186314
|
186315
|
186316
|
186317
|
188549
|
188552
|
189655
| 189656