[Koha-bugs] [Bug 24387] Rename News tool
bugzilla-daemon at bugs.koha-community.org
bugzilla-daemon at bugs.koha-community.org
Fri Nov 4 13:06:22 CET 2022
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24387
Tomás Cohen Arazi <tomascohen at gmail.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Attachment #142653|0 |1
is obsolete| |
--- Comment #71 from Tomás Cohen Arazi <tomascohen at gmail.com> ---
Comment on attachment 142653
--> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=142653
Bug 24387 - fixup to db_rev for non-english, multilingual Koha
>From 559376aaf1c53efa1589a37e77769c6ffc41088d Mon Sep 17 00:00:00 2001
>From: Blou <blou at inlibro.com>
>Date: Tue, 25 Oct 2022 14:55:52 -0400
>Subject: [PATCH] Bug 24387 - 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, 2 insertions(+), 2 deletions(-)
>
>diff --git a/installer/data/mysql/db_revs/210600016.pl b/installer/data/mysql/db_revs/210600016.pl
>index 8d66de86cb..6d03adc89d 100755
>--- a/installer/data/mysql/db_revs/210600016.pl
>+++ b/installer/data/mysql/db_revs/210600016.pl
>@@ -111,7 +111,7 @@ 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"
>+# $new_lang = "default" if $new_lang eq 'en'; # Assume that "en" is "default"
>
> my $sth_update = $dbh->prepare(q|
> UPDATE additional_contents
>@@ -124,7 +124,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 are receiving this mail because:
You are watching all bug changes.
More information about the Koha-bugs
mailing list