From 6c1a4312c4c6416eeed9220982db69c2ae5cd8f3 Mon Sep 17 00:00:00 2001 From: Martin Renvoize Date: Mon, 27 Apr 2020 11:17:33 +0100 Subject: [PATCH] Bug 25045: DBRev 19.12.00.079 Signed-off-by: Martin Renvoize --- Koha.pm | 2 +- installer/data/mysql/atomicupdate/bug_25045.perl | 15 --------------- installer/data/mysql/updatedatabase.pl | 16 ++++++++++++++++ 3 files changed, 17 insertions(+), 16 deletions(-) delete mode 100644 installer/data/mysql/atomicupdate/bug_25045.perl diff --git a/Koha.pm b/Koha.pm index f4c07b92b2..14025c60c9 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 = "19.12.00.078"; +$VERSION = "19.12.00.079"; sub version { return $VERSION; diff --git a/installer/data/mysql/atomicupdate/bug_25045.perl b/installer/data/mysql/atomicupdate/bug_25045.perl deleted file mode 100644 index d2b62edf80..0000000000 --- a/installer/data/mysql/atomicupdate/bug_25045.perl +++ /dev/null @@ -1,15 +0,0 @@ -$DBversion = 'XXX'; # will be replaced by the RM -if( CheckVersion( $DBversion ) ) { - - # Default to the homologous OpacPublic syspref - my $opac_public = C4::Context->preference('OpacPublic') ? 1 : 0; - - $dbh->do(qq{ - INSERT IGNORE INTO `systempreferences` - (`variable`,`value`,`explanation`,`options`,`type`) - VALUES - ('RESTPublicAnonymousRequests', $opac_public, NULL,'If enabled, the API will allow anonymous access to public routes that don\'t require authenticated access'.','YesNo'); - }); - - NewVersion( $DBversion, 25045, "Add a way to restrict anonymous access to public routes (OpacPublic behaviour)"); -} diff --git a/installer/data/mysql/updatedatabase.pl b/installer/data/mysql/updatedatabase.pl index 7ac1149c09..def5093852 100755 --- a/installer/data/mysql/updatedatabase.pl +++ b/installer/data/mysql/updatedatabase.pl @@ -21837,6 +21837,22 @@ if( CheckVersion( $DBversion ) ) { NewVersion( $DBversion, 24913, "Add PatronSelfRegistrationConfirmEmail syspref"); } +$DBversion = '19.12.00.079'; +if( CheckVersion( $DBversion ) ) { + + # Default to the homologous OpacPublic syspref + my $opac_public = C4::Context->preference('OpacPublic') ? 1 : 0; + + $dbh->do(qq{ + INSERT IGNORE INTO `systempreferences` + (`variable`,`value`,`explanation`,`options`,`type`) + VALUES + ('RESTPublicAnonymousRequests', $opac_public, NULL,'If enabled, the API will allow anonymous access to public routes that don\'t require authenticated access'.','YesNo'); + }); + + NewVersion( $DBversion, 25045, "Add a way to restrict anonymous access to public routes (OpacPublic behaviour)"); +} + # SEE bug 13068 # if there is anything in the atomicupdate, read and execute it. my $update_dir = C4::Context->config('intranetdir') . '/installer/data/mysql/atomicupdate/'; -- 2.39.2