From 96a3ee5e0699ebf388c6af841eef12d2901a7012 Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Wed, 25 Oct 2017 16:50:34 -0300 Subject: [PATCH] Bug 19038: DBRev 17.06.00.022 Signed-off-by: Jonathan Druart --- Koha.pm | 2 +- ..._19038_remove_opacshowbarcode_syspref.perl | 21 ------------------- installer/data/mysql/updatedatabase.pl | 21 +++++++++++++++++++ 3 files changed, 22 insertions(+), 22 deletions(-) delete mode 100644 installer/data/mysql/atomicupdate/bug_19038_remove_opacshowbarcode_syspref.perl diff --git a/Koha.pm b/Koha.pm index 8578fa07f3..27ccfdd387 100644 --- a/Koha.pm +++ b/Koha.pm @@ -29,7 +29,7 @@ use vars qw{ $VERSION }; # - #4 : the developer version. The 4th number is the database subversion. # used by developers when the database changes. updatedatabase take care of the changes itself # and is automatically called by Auth.pm when needed. -$VERSION = "17.06.00.021"; +$VERSION = "17.06.00.022"; sub version { return $VERSION; diff --git a/installer/data/mysql/atomicupdate/bug_19038_remove_opacshowbarcode_syspref.perl b/installer/data/mysql/atomicupdate/bug_19038_remove_opacshowbarcode_syspref.perl deleted file mode 100644 index 5b76096df7..0000000000 --- a/installer/data/mysql/atomicupdate/bug_19038_remove_opacshowbarcode_syspref.perl +++ /dev/null @@ -1,21 +0,0 @@ -$DBversion = 'XXX'; -if( CheckVersion( $DBversion ) ) { - my $hide_barcode = C4::Context->preference('OPACShowBarcode') ? 0 : 1; - - $dbh->do(q{ - DELETE FROM systempreferences - WHERE - variable='OPACShowBarcode' - }); - - # Configure column visibility if it isn't - $dbh->do(q{ - INSERT IGNORE INTO columns_settings - (module,page,tablename,columnname,cannot_be_toggled,is_hidden) - VALUES - ('opac','biblio-detail','holdingst','item_barcode',0,?) - }, undef, $hide_barcode); - - SetVersion( $DBversion ); - print "Upgrade to $DBversion done (Bug 19038: Remove OPACShowBarcode syspref)\n"; -} \ No newline at end of file diff --git a/installer/data/mysql/updatedatabase.pl b/installer/data/mysql/updatedatabase.pl index 5b3a192d27..c3f8a1ae0f 100755 --- a/installer/data/mysql/updatedatabase.pl +++ b/installer/data/mysql/updatedatabase.pl @@ -14883,6 +14883,27 @@ if( CheckVersion( $DBversion ) ) { print "Upgrade to $DBversion done (Bug 17381 - Add system preference SCOMainUserBlock)\n"; } +$DBversion = '17.06.00.022'; +if( CheckVersion( $DBversion ) ) { + my $hide_barcode = C4::Context->preference('OPACShowBarcode') ? 0 : 1; + $dbh->do(q{ + DELETE FROM systempreferences + WHERE + variable='OPACShowBarcode' + }); + + # Configure column visibility if it isn't + $dbh->do(q{ + INSERT IGNORE INTO columns_settings + (module,page,tablename,columnname,cannot_be_toggled,is_hidden) + VALUES + ('opac','biblio-detail','holdingst','item_barcode',0,?) + }, undef, $hide_barcode); + + SetVersion( $DBversion ); + print "Upgrade to $DBversion done (Bug 19038: Remove OPACShowBarcode syspref)\n"; +} + # DEVELOPER PROCESS, search for anything to execute in the db_update directory # SEE bug 13068 # if there is anything in the atomicupdate, read and execute it. -- 2.39.5