Bugzilla – Attachment 102128 Details for
Bug 4944
Create separate noItemTypeImages preferences for OPAC and staff client
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 4944: Do not rely on the values from cache during the update DB process
Bug-4944-Do-not-rely-on-the-values-from-cache-duri.patch (text/plain), 1.77 KB, created by
Jonathan Druart
on 2020-03-31 12:46:50 UTC
(
hide
)
Description:
Bug 4944: Do not rely on the values from cache during the update DB process
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2020-03-31 12:46:50 UTC
Size:
1.77 KB
patch
obsolete
>From 70b6354da635f772d1e4f466b2556cabdc82349e Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Tue, 31 Mar 2020 14:45:14 +0200 >Subject: [PATCH] Bug 4944: Do not rely on the values from cache during the > update DB process > >We never know, as we insert values direcly to the DB, the cache may not >be correct. > >Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >--- > .../mysql/atomicupdate/bug_4944_OpacNoItemTypeImages.perl | 8 +++++--- > 1 file changed, 5 insertions(+), 3 deletions(-) > >diff --git a/installer/data/mysql/atomicupdate/bug_4944_OpacNoItemTypeImages.perl b/installer/data/mysql/atomicupdate/bug_4944_OpacNoItemTypeImages.perl >index 77c2a5eebb..768d72d731 100644 >--- a/installer/data/mysql/atomicupdate/bug_4944_OpacNoItemTypeImages.perl >+++ b/installer/data/mysql/atomicupdate/bug_4944_OpacNoItemTypeImages.perl >@@ -1,9 +1,11 @@ > $DBversion = 'XXX'; # will be replaced by the RM > if( CheckVersion( $DBversion ) ) { > >- my $noItemTypeImages = C4::Context->preference('noItemTypeImages'); >- $dbh->do( "INSERT IGNORE INTO systempreferences ( `variable`, `value`, `options`, `explanation`, `type` ) >- VALUES('OpacNoItemTypeImages',$noItemTypeImages,NULL,'If ON, disables itemtype images in the OPAC','YesNo')" ); >+ $dbh->do( q| >+ INSERT IGNORE INTO systempreferences ( `variable`, `value`, `options`, `explanation`, `type` ) >+ SELECT 'OpacNoItemTypeImages', value, NULL, 'If ON, disables itemtype images in the OPAC','YesNo' >+ FROM (SELECT value FROM systempreferences WHERE variable="NoItemTypeImages") tmp >+ | ); > $dbh->do( "UPDATE systempreferences SET explanation = 'If ON, disables itemtype images in the staff interface' > WHERE variable = 'noItemTypeImages' "); > >-- >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 4944
:
102040
|
102075
|
102127
| 102128 |
102438