From 8b315919124b6caa4ba0a5ad918da723cf7d317e Mon Sep 17 00:00:00 2001 From: Aleisha Amohia Date: Mon, 22 Jun 2020 10:09:42 +1200 Subject: [PATCH] Bug 25045: DBRev 19.11.06.001 Signed-off-by: Aleisha Amohia --- 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 34be0838ef..fa0c1e0a7f 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.11.06.000"; +$VERSION = "19.11.06.001"; 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 2a47244075..fb808ce99c 100755 --- a/installer/data/mysql/updatedatabase.pl +++ b/installer/data/mysql/updatedatabase.pl @@ -20586,6 +20586,22 @@ if ( CheckVersion($DBversion) ) { SetVersion ($DBversion); } +$DBversion = '19.11.06.001'; +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.5