From d4de185debc279916363b460f1c8f120eb4aaa9b Mon Sep 17 00:00:00 2001 From: Paul Poulain Date: Mon, 9 Nov 2009 11:57:28 +0100 Subject: [PATCH] fixing some errors in updatedatabase --- installer/data/mysql/updatedatabase.pl | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/installer/data/mysql/updatedatabase.pl b/installer/data/mysql/updatedatabase.pl index 6b13379d68..3a2b691b22 100755 --- a/installer/data/mysql/updatedatabase.pl +++ b/installer/data/mysql/updatedatabase.pl @@ -2735,7 +2735,7 @@ if (C4::Context->preference("Version") < TransformToNum($DBversion)) { # fill AnonymousPatron with AnonymousSuggestion value (copy) my $sth=$dbh->prepare("SELECT value FROM systempreferences WHERE variable='AnonSuggestions'"); $sth->execute; - my ($value) = $sth->fetchrow(); + my ($value) = $sth->fetchrow() || 0; $dbh->do("UPDATE systempreferences SET value='$value' WHERE variable='AnonymousPatron'"); # set AnonymousSuggestion do YesNo # 1st, set the value (1/True if it had a borrowernumber) @@ -3050,10 +3050,7 @@ ALTER table suggestions ; SUGGESTIONS - print <preference("Version") < TransformToNum($DBversion)) { $DBversion = "3.01.00.118"; if (C4::Context->preference("Version") < TransformToNum($DBversion)) { $dbh->do(" -??? d'ici jusqu'à ???FIN des lignes ont pu être insérées/effacées INSERT INTO `permissions` (`module_bit`, `code`, `description`) VALUES (16, 'execute_reports', 'Execute SQL reports'), (16, 'create_reports', 'Create SQL Reports') @@ -3150,10 +3146,10 @@ if (C4::Context->preference("Version") < TransformToNum($DBversion)) { $DBversion = "3.01.00.123"; if (C4::Context->preference("Version") < TransformToNum($DBversion)) { $dbh->do(qq{ - ALTER TABLE aqbasketgroups ADD deliveryplace VARCHAR(10) default NULL ADD deliverycomment VARCHAR(255) default NULL; + ALTER TABLE aqbasketgroups ADD deliveryplace VARCHAR(10) default NULL, ADD deliverycomment VARCHAR(255) default NULL; }); - print "Upgrade to $DBversion done (isbd updated)\n"; + print "Upgrade to $DBversion done (delivery place and comment)\n"; SetVersion ($DBversion); } -- 2.39.5