Bugzilla – Attachment 99366 Details for
Bug 22880
Convert opacheader system preference to news block
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 22880: (follow-up) Process all installed languages, not just enabled
Bug-22880-follow-up-Process-all-installed-language.patch (text/plain), 1.71 KB, created by
Marcel de Rooy
on 2020-02-21 09:57:22 UTC
(
hide
)
Description:
Bug 22880: (follow-up) Process all installed languages, not just enabled
Filename:
MIME Type:
Creator:
Marcel de Rooy
Created:
2020-02-21 09:57:22 UTC
Size:
1.71 KB
patch
obsolete
>From a64b9a90e1cdc740186b8210e29db284f9447be2 Mon Sep 17 00:00:00 2001 >From: Owen Leonard <oleonard@myacpl.org> >Date: Thu, 12 Dec 2019 13:30:43 +0000 >Subject: [PATCH] Bug 22880: (follow-up) Process all installed languages, not > just enabled >Content-Type: text/plain; charset=utf-8 > >This patch changes the database update so that the system preference is >copied to news items in all installed languages, not just those enabled >in the OPAC. > >Signed-off-by: Lisette Scheer <lisettes@latahlibrary.org> >--- > .../atomicupdate/bug_22880-move-opacheader-to-news.perl | 13 +++++++++++-- > 1 file changed, 11 insertions(+), 2 deletions(-) > >diff --git a/installer/data/mysql/atomicupdate/bug_22880-move-opacheader-to-news.perl b/installer/data/mysql/atomicupdate/bug_22880-move-opacheader-to-news.perl >index 046f018be4..86888b8dcc 100644 >--- a/installer/data/mysql/atomicupdate/bug_22880-move-opacheader-to-news.perl >+++ b/installer/data/mysql/atomicupdate/bug_22880-move-opacheader-to-news.perl >@@ -1,8 +1,17 @@ > $DBversion = 'XXX'; # will be replaced by the RM > if( CheckVersion( $DBversion ) ) { >- my $opaclang = C4::Context->preference("opaclanguages"); >+ >+ # get list of installed translations >+ use C4::Languages qw(getTranslatedLanguages); > my @langs; >- push @langs, split ( '\,', $opaclang ); >+ my $tlangs = getTranslatedLanguages(); >+ >+ foreach my $language ( @$tlangs ) { >+ foreach my $sublanguage ( @{$language->{'sublanguages_loop'}} ) { >+ push @langs, $sublanguage->{'rfc4646_subtag'}; >+ } >+ } >+ > # Get any existing value from the opacheader system preference > my ($opacheader) = $dbh->selectrow_array( q| > SELECT value FROM systempreferences WHERE variable='opacheader'; >-- >2.11.0
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 22880
:
89517
|
90495
|
92207
|
92208
|
92592
|
92593
|
92594
|
92600
|
92601
|
92602
|
96209
|
96210
|
96219
|
98773
|
98775
|
98985
|
98986
|
98987
|
98988
|
98989
|
99362
|
99363
|
99364
|
99365
|
99366
|
99367
|
99490
|
99491
|
99492
|
99493
|
99494
|
99495
|
99496
|
99497
|
99498