Bugzilla – Attachment 98874 Details for
Bug 20307
Language overlay for authorized values
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 20307: Few more fixes due to bad rebase conflict resolutions
Bug-20307-Few-more-fixes-due-to-bad-rebase-conflic.patch (text/plain), 4.44 KB, created by
Martin Renvoize (ashimema)
on 2020-02-13 16:09:55 UTC
(
hide
)
Description:
Bug 20307: Few more fixes due to bad rebase conflict resolutions
Filename:
MIME Type:
Creator:
Martin Renvoize (ashimema)
Created:
2020-02-13 16:09:55 UTC
Size:
4.44 KB
patch
obsolete
>From ec498033a5d80384b7353979bc8e8cb1e880b839 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Tue, 15 Oct 2019 16:52:09 +0200 >Subject: [PATCH] Bug 20307: Few more fixes due to bad rebase conflict > resolutions > >Signed-off-by: Michal Denar <black23@gmail.com> >Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> >--- > Koha/AuthorisedValues.pm | 14 +++++++++----- > installer/data/mysql/atomicupdate/bug_20307.perl | 2 +- > .../prog/en/modules/admin/authorised_values.tt | 8 ++++---- > 3 files changed, 14 insertions(+), 10 deletions(-) > >diff --git a/Koha/AuthorisedValues.pm b/Koha/AuthorisedValues.pm >index 475423f977..dbdfcf4c04 100644 >--- a/Koha/AuthorisedValues.pm >+++ b/Koha/AuthorisedValues.pm >@@ -27,7 +27,7 @@ use Koha::AuthorisedValue; > use Koha::MarcSubfieldStructures; > use Koha::Cache::Memory::Lite; > >-use base qw(Koha::Objects); >+use base qw(Koha::Objects Koha::Objects::Limit::Library); > > =head1 NAME > >@@ -62,7 +62,7 @@ sub search { > : {}; > > my @join = $attributes->{join} || (); >- push @join, 'authorised_values_branches'; >+ push @join, $branchcode ? 'authorised_values_branches' : (); > my $join = { join => \@join }; > $attributes //= {}; > $attributes = { %$attributes, %$join }; >@@ -197,15 +197,19 @@ sub search_with_localization { > $attributes->{order_by} = 'translated_description' unless exists $attributes->{order_by}; > my @join = $attributes->{join} || (); > push @join, 'localization'; >- my $join = { join => \@join }; >+ $attributes->{join} = \@join; > $attributes->{'+select'} = [ > { > coalesce => [qw( localization.translation me.lib )], > -as => 'translated_description' > } > ]; >- $attributes = { %$attributes, %$join }; >- $self->search( $params, $attributes ); >+ if(defined $params->{branchcode}) { >+ my $branchcode = delete $params->{branchcode}; >+ $self->search_with_library_limits( $params, $attributes, $branchcode ); >+ } else { >+ $self->SUPER::search( $params, $attributes ); >+ } > } > > >diff --git a/installer/data/mysql/atomicupdate/bug_20307.perl b/installer/data/mysql/atomicupdate/bug_20307.perl >index c82a7af872..ffaff3c386 100644 >--- a/installer/data/mysql/atomicupdate/bug_20307.perl >+++ b/installer/data/mysql/atomicupdate/bug_20307.perl >@@ -2,7 +2,7 @@ $DBversion = 'XXX'; # will be replaced by the RM > if ( CheckVersion($DBversion) ) { > if ( !column_exists( 'localization', 'interface' ) ) { > $dbh->do("ALTER TABLE `localization` ADD COLUMN `interface` VARCHAR(30) DEFAULT NULL AFTER `entity`"); >- $dbh->do("ALTER TABLE `localization` DROP FOREIGN KEY `entity_code_lang`"); >+ $dbh->do("ALTER TABLE `localization` DROP KEY `entity_code_lang`"); > $dbh->do("ALTER TABLE `localization` ADD UNIQUE KEY `entity_code_interface_lang` (entity, code, interface, lang)"); > $dbh->do("ALTER TABLE `localization` MODIFY entity VARCHAR(30) NOT NULL"); > } >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/authorised_values.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/authorised_values.tt >index 1efe5967e8..d267838dd0 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/authorised_values.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/authorised_values.tt >@@ -255,7 +255,7 @@ > <td>[% av.lib_opac | html %]</td> > <td>[% IF ( av.imageurl ) %]<img src="[% av.imageurl | url %]" alt=""/>[% ELSE %] [% END %]</td> > <td> >- [% IF av.branch_limitations.size > 0 %] >+ [% IF av.library_limits.count > 0 %] > [% branches_str = "" %] > [% FOREACH library IN av.library_limits %] > [%- IF loop.first -%] >@@ -265,10 +265,10 @@ > [% END %] > [% END %] > <span class="library_limitation" title="[% branches_str | html %]"> >- [% IF av.library_limits.size > 1 %] >- [% av.library_limits.size | html %] library limitations >+ [% IF av.library_limits.count > 1 %] >+ [% av.library_limits.count | html %] library limitations > [% ELSE %] >- [% av.library_limits.size | html %] library limitation >+ [% av.library_limits.count | html %] library limitation > [% END %] > [% ELSE %] > No limitation >-- >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 20307
:
86622
|
86623
|
86624
|
86625
|
86626
|
86627
|
89538
|
91645
|
91646
|
91647
|
91648
|
91649
|
91650
|
91651
|
91653
|
92192
|
92193
|
92359
|
92360
|
92361
|
94245
|
94246
|
94247
|
94248
|
94249
|
94250
|
94251
|
94252
|
94253
|
94254
|
94255
|
94256
|
94700
|
94701
|
94702
|
94703
|
94704
|
94705
|
94706
|
94707
|
94708
|
94709
|
94710
|
94711
|
97074
|
97075
|
98863
|
98864
|
98865
|
98866
|
98867
|
98868
|
98869
|
98870
|
98871
|
98872
|
98873
| 98874 |
98875
|
98876
|
101070
|
101450