DBRev for bug 8753 (removing the atomicupdate too).
authorBrendan Gallagher <brendan@bywatersolutions.com>
Wed, 27 Jan 2016 17:58:47 +0000 (17:58 +0000)
committerBrendan Gallagher <brendan@bywatersolutions.com>
Wed, 27 Jan 2016 17:58:47 +0000 (17:58 +0000)
Signed-off-by: Brendan Gallagher brendan@bywatersolutions.com
Koha.pm
installer/data/mysql/atomicupdate/bug_8753-Add_forgot_password_link_to_OPAC.sql [deleted file]
installer/data/mysql/updatedatabase.pl

diff --git a/Koha.pm b/Koha.pm
index 8ea5f21..87fd962 100644 (file)
--- 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 (file)
index f47e562..0000000
+++ /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','<html>\r\n<p>This email has been sent in response to your password recovery request for the account <strong><<user>></strong>.\r\n</p>\r\n<p>\r\nYou can now create your new password using the following link:\r\n<br/><a href=\"<<passwordreseturl>>\"><<passwordreseturl>></a>\r\n</p>\r\n<p>This link will be valid for 2 days from this email\'s reception, then you must reapply if you do not change your password.</p>\r\n<p>Thank you.</p>\r\n</html>\r\n','email');
index 6ed1223..e8f2f9e 100755 (executable)
@@ -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','<html>\r\n<p>This email has been sent in response to your password recovery request for the account <strong><<user>></strong>.\r\n</p>\r\n<p>\r\nYou can now create your new password using the following link:\r\n<br/><a href=\"<<passwordreseturl>>\"><<passwordreseturl>></a>\r\n</p>\r\n<p>This link will be valid for 2 days from this email\'s reception, then you must reapply if you do not change your password.</p>\r\n<p>Thank you.</p>\r\n</html>\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.