From b8acd86231a3b63f311a1c6357acc8096bef06ed Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Tue, 8 May 2018 16:07:03 -0300 Subject: [PATCH] Bug 20624: DBRev 17.12.00.044 Signed-off-by: Jonathan Druart --- Koha.pm | 2 +- .../mysql/atomicupdate/bug_20624_disable_oauth.perl | 12 ------------ installer/data/mysql/updatedatabase.pl | 13 +++++++++++++ 3 files changed, 14 insertions(+), 13 deletions(-) delete mode 100644 installer/data/mysql/atomicupdate/bug_20624_disable_oauth.perl diff --git a/Koha.pm b/Koha.pm index 60e80b2055..014dd7ff78 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.12.00.043"; +$VERSION = "17.12.00.044"; sub version { return $VERSION; diff --git a/installer/data/mysql/atomicupdate/bug_20624_disable_oauth.perl b/installer/data/mysql/atomicupdate/bug_20624_disable_oauth.perl deleted file mode 100644 index 79bc904240..0000000000 --- a/installer/data/mysql/atomicupdate/bug_20624_disable_oauth.perl +++ /dev/null @@ -1,12 +0,0 @@ -$DBversion = "XXX"; -if(CheckVersion($DBversion)) { - - $dbh->do(q{ - INSERT IGNORE INTO systempreferences (`variable`,`value`,`options`,`explanation`,`type`) - VALUES - ('RESTOAuth2ClientCredentials','0',NULL,'If enabled, the OAuth2 client credentials flow is enabled for the REST API.','YesNo'); - }); - - print "Upgrade to $DBversion done (Bug 20624 - Disable OAuth2 client credentials grant by default)\n"; - SetVersion($DBversion); -} diff --git a/installer/data/mysql/updatedatabase.pl b/installer/data/mysql/updatedatabase.pl index 32229b92fe..31ae057df3 100755 --- a/installer/data/mysql/updatedatabase.pl +++ b/installer/data/mysql/updatedatabase.pl @@ -16036,6 +16036,19 @@ if(CheckVersion($DBversion)) { SetVersion($DBversion); } +$DBversion = '17.12.00.044'; +if(CheckVersion($DBversion)) { + + $dbh->do(q{ + INSERT IGNORE INTO systempreferences (`variable`,`value`,`options`,`explanation`,`type`) + VALUES + ('RESTOAuth2ClientCredentials','0',NULL,'If enabled, the OAuth2 client credentials flow is enabled for the REST API.','YesNo'); + }); + + print "Upgrade to $DBversion done (Bug 20624 - Disable OAuth2 client credentials grant by default)\n"; + SetVersion($DBversion); +} + # SEE bug 13068 # if there is anything in the atomicupdate, read and execute it. -- 2.39.5