From c76bcd508a0929609a7988275e05558003a3a23d Mon Sep 17 00:00:00 2001 From: Brendan Gallagher Date: Wed, 27 Jan 2016 17:58:47 +0000 Subject: [PATCH] DBRev for bug 8753 (removing the atomicupdate too). Signed-off-by: Brendan Gallagher brendan@bywatersolutions.com --- Koha.pm | 2 +- ..._8753-Add_forgot_password_link_to_OPAC.sql | 13 ---------- installer/data/mysql/updatedatabase.pl | 25 +++++++++++++++++++ 3 files changed, 26 insertions(+), 14 deletions(-) delete mode 100644 installer/data/mysql/atomicupdate/bug_8753-Add_forgot_password_link_to_OPAC.sql diff --git a/Koha.pm b/Koha.pm index 8ea5f2143e..87fd962837 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 = "3.23.00.015"; +$VERSION = "3.23.00.016"; sub version { return $VERSION; diff --git a/installer/data/mysql/atomicupdate/bug_8753-Add_forgot_password_link_to_OPAC.sql b/installer/data/mysql/atomicupdate/bug_8753-Add_forgot_password_link_to_OPAC.sql deleted file mode 100644 index f47e562b06..0000000000 --- a/installer/data/mysql/atomicupdate/bug_8753-Add_forgot_password_link_to_OPAC.sql +++ /dev/null @@ -1,13 +0,0 @@ -INSERT IGNORE INTO systempreferences (variable,value,options,explanation,type) -VALUES ('OpacResetPassword', '0','','Shows the ''Forgot your password?'' link in the OPAC','YesNo'); - -CREATE TABLE IF NOT EXISTS borrower_password_recovery ( - borrowernumber int(11) NOT NULL, - uuid varchar(128) NOT NULL, - valid_until timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, - PRIMARY KEY (borrowernumber), - KEY borrowernumber (borrowernumber) -) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; - -INSERT IGNORE INTO `letter` (module, code, branchcode, name, is_html, title, content, message_transport_type) -VALUES ('members','PASSWORD_RESET','','Online password reset',1,'Koha password recovery','\r\n

This email has been sent in response to your password recovery request for the account <>.\r\n

\r\n

\r\nYou can now create your new password using the following link:\r\n
>\"><>\r\n

\r\n

This link will be valid for 2 days from this email\'s reception, then you must reapply if you do not change your password.

\r\n

Thank you.

\r\n\r\n','email'); diff --git a/installer/data/mysql/updatedatabase.pl b/installer/data/mysql/updatedatabase.pl index 6ed1223ebb..e8f2f9efdc 100755 --- a/installer/data/mysql/updatedatabase.pl +++ b/installer/data/mysql/updatedatabase.pl @@ -11669,6 +11669,31 @@ if ( CheckVersion($DBversion) ) { SetVersion($DBversion); } +$DBversion = "3.23.00.016"; +if ( CheckVersion($DBversion) ) { + $dbh->do(q{ + INSERT IGNORE INTO systempreferences (variable,value,options,explanation,type) + VALUES ('OpacResetPassword', '0','','Shows the ''Forgot your password?'' link in the OPAC','YesNo'); +}); + $dbh->do(q{ + CREATE TABLE IF NOT EXISTS borrower_password_recovery ( + borrowernumber int(11) NOT NULL, + uuid varchar(128) NOT NULL, + valid_until timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, + PRIMARY KEY (borrowernumber), + KEY borrowernumber (borrowernumber) + ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; +}); + $dbh->do(q{ + INSERT IGNORE INTO `letter` (module, code, branchcode, name, is_html, title, content, message_transport_type) + VALUES ('members','PASSWORD_RESET','','Online password reset',1,'Koha password recovery','\r\n

This email has been sent in response to your password recovery request for the account <>.\r\n

\r\n

\r\nYou can now create your new password using the following link:\r\n
>\"><>\r\n

\r\n

This link will be valid for 2 days from this email\'s reception, then you must reapply if you do not change your password.

\r\n

Thank you.

\r\n\r\n','email'); + + }); + + print "Upgrade to $DBversion done (Bug 8753 - Add forgot password link to OPAC)\n"; + SetVersion($DBversion); +} + # 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