Bug 9107: remove the syspref from the database, as well
authorPaul Poulain <paul.poulain@biblibre.com>
Tue, 20 Nov 2012 10:44:18 +0000 (11:44 +0100)
committerJared Camins-Esakov <jcamins@cpbibliography.com>
Tue, 20 Nov 2012 11:56:58 +0000 (06:56 -0500)
The syspref has been introduced during 3.9, so only a few libraries
should have it, but for consistency it must be removed.

Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
installer/data/mysql/updatedatabase.pl

index 518f23a..07c0b43 100755 (executable)
@@ -6055,6 +6055,14 @@ if (C4::Context->preference("Version") < TransformToNum($DBversion)) {
    SetVersion ($DBversion);
 }
 
+$DBversion = "XXX";
+if (C4::Context->preference("Version") < TransformToNum($DBversion)) {
+   $dbh->do("DELETE FROM systempreferences WHERE variable='DidYouMeanFromAuthorities'");
+   print "Upgrade to $DBversion done (Bug 9107: remove DidYouMeanFromAuthorities syspref)\n";
+   SetVersion ($DBversion);
+}
+
+
 =head1 FUNCTIONS
 
 =head2 TableExists($table)