Bugzilla – Attachment 143179 Details for
Bug 32110
Duplicated additional content entries on DBRev 210600016
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 32110: Fixup to db_rev for non-english, multilingual Koha
Bug-32110-Fixup-to-dbrev-for-non-english-multiling.patch (text/plain), 2.18 KB, created by
Tomás Cohen Arazi (tcohen)
on 2022-11-04 12:04:46 UTC
(
hide
)
Description:
Bug 32110: Fixup to db_rev for non-english, multilingual Koha
Filename:
MIME Type:
Creator:
Tomás Cohen Arazi (tcohen)
Created:
2022-11-04 12:04:46 UTC
Size:
2.18 KB
patch
obsolete
>From b21696ab9a8c2b8e2f2a78c0abca9f4d13e12b4c Mon Sep 17 00:00:00 2001 >From: Blou <blou@inlibro.com> >Date: Tue, 25 Oct 2022 14:55:52 -0400 >Subject: [PATCH] Bug 32110: Fixup to db_rev for non-english, multilingual Koha > >Without this patch, the update process duplicates all the news and >content entries when they were non-english to start with. > >This patch keeps the same process, but new "default" "parent" entries are empty so there' >no duplication in the OPAC display, while still being editable/deletable >in the intranet. > >We came through that through many iterations. This was the least >invasive while still providing satisfying results. >--- > installer/data/mysql/db_revs/210600016.pl | 4 +--- > 1 file changed, 1 insertion(+), 3 deletions(-) > >diff --git a/installer/data/mysql/db_revs/210600016.pl b/installer/data/mysql/db_revs/210600016.pl >index 8d66de86cbf..7c9b06700a0 100755 >--- a/installer/data/mysql/db_revs/210600016.pl >+++ b/installer/data/mysql/db_revs/210600016.pl >@@ -111,8 +111,6 @@ return { > # Now this is getting weird > # We are adding an extra news with the same code when the lang is not "default" (/"en") > >- $new_lang = "default" if $new_lang eq 'en'; # Assume that "en" is "default" >- > my $sth_update = $dbh->prepare(q| > UPDATE additional_contents > SET category=?, location=?, lang=? >@@ -124,7 +122,7 @@ return { > $dbh->do(q| > INSERT INTO additional_contents(category, code, location, branchcode, title, content, lang, published_on, updated_on, expirationdate, number, borrowernumber) > VALUES(?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) >- |, undef, $category, 'tmp_code', $location, $c->{branchcode}, $c->{title}, $c->{content}, 'default', $c->{published_on}, $c->{updated_on}, $c->{expirationdate}, $c->{number}, $c->{borrowernumber}); >+ |, undef, $category, 'tmp_code', $location, $c->{branchcode}, $c->{title}, '', 'default', $c->{published_on}, $c->{updated_on}, $c->{expirationdate}, $c->{number}, $c->{borrowernumber}); > > $parent_idnew = $dbh->last_insert_id(undef, undef, 'additional_contents', undef); > } >-- >2.34.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 32110
:
143179
|
143290
|
143365