From 7a1641cd41bf51a992cb07dff58d320c49f15b68 Mon Sep 17 00:00:00 2001 From: Nick Clemens Date: Fri, 2 Nov 2018 10:31:47 +0000 Subject: [PATCH] Bug 14385: DBRev 18.06.00.050 Signed-off-by: Nick Clemens --- C4/Items.pm | 2 +- Koha.pm | 2 +- .../bug_14385-add_OpacHiddenItemsExceptions_syspref.sql | 1 - installer/data/mysql/updatedatabase.pl | 9 +++++++++ 4 files changed, 11 insertions(+), 3 deletions(-) delete mode 100644 installer/data/mysql/atomicupdate/bug_14385-add_OpacHiddenItemsExceptions_syspref.sql diff --git a/C4/Items.pm b/C4/Items.pm index 4dd3badf03..8f3ef33469 100644 --- a/C4/Items.pm +++ b/C4/Items.pm @@ -1293,7 +1293,7 @@ sub GetHiddenItemnumbers { if (my $exceptions = C4::Context->preference('OpacHiddenItemsExceptions') and $params->{'borcat'}){ foreach my $except (split(/\|/, $exceptions)){ if ($params->{'borcat'} eq $except){ - return; # we dont hide anything for this borrower category + return; # we don't hide anything for this borrower category } } } diff --git a/Koha.pm b/Koha.pm index cdf1615786..2ff8513b78 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 = "18.06.00.049"; +$VERSION = "18.06.00.050"; sub version { return $VERSION; diff --git a/installer/data/mysql/atomicupdate/bug_14385-add_OpacHiddenItemsExceptions_syspref.sql b/installer/data/mysql/atomicupdate/bug_14385-add_OpacHiddenItemsExceptions_syspref.sql deleted file mode 100644 index 5cde421bbf..0000000000 --- a/installer/data/mysql/atomicupdate/bug_14385-add_OpacHiddenItemsExceptions_syspref.sql +++ /dev/null @@ -1 +0,0 @@ -INSERT IGNORE INTO systempreferences (`variable`, `value`, `options`, `explanation`, `type`) VALUES ('OpacHiddenItemsExceptions','',NULL,'List of borrower categories, separated by |, that can see items otherwise hidden by OpacHiddenItems','Textarea'); diff --git a/installer/data/mysql/updatedatabase.pl b/installer/data/mysql/updatedatabase.pl index 6e9d899009..a537a155b5 100755 --- a/installer/data/mysql/updatedatabase.pl +++ b/installer/data/mysql/updatedatabase.pl @@ -16766,6 +16766,15 @@ if( CheckVersion( $DBversion ) ) { SetVersion( $DBversion ); } +$DBversion = '18.06.00.050'; +if( CheckVersion( $DBversion ) ) { + $dbh->do(q{ + INSERT IGNORE INTO systempreferences (`variable`, `value`, `options`, `explanation`, `type`) VALUES ('OpacHiddenItemsExceptions','',NULL,'List of borrower categories, separated by |, that can see items otherwise hidden by OpacHiddenItems','Textarea'); + }); + print "Upgrade to $DBversion done (Bug 14385 - Add OpacHiddenItemExceptions)\n"; + SetVersion( $DBversion ); +} + # SEE bug 13068 # if there is anything in the atomicupdate, read and execute it. -- 2.39.5