From 1f92dbafdf87771282b234578fd30f53ddb0fc0f Mon Sep 17 00:00:00 2001 From: Andrew Moore Date: Thu, 24 Apr 2008 11:34:26 -0500 Subject: [PATCH] bug 2044: adding database change for itemtype icon change This is the database update change to take into account the rearrangement of the itemtype icons directory. Signed-off-by: Joshua Ferraro --- installer/data/mysql/updatedatabase.pl | 18 ++++++++++++++++-- kohaversion.pl | 2 +- 2 files changed, 17 insertions(+), 3 deletions(-) diff --git a/installer/data/mysql/updatedatabase.pl b/installer/data/mysql/updatedatabase.pl index dd18d70b87..03f55e8d60 100755 --- a/installer/data/mysql/updatedatabase.pl +++ b/installer/data/mysql/updatedatabase.pl @@ -49,7 +49,9 @@ my $dbh = C4::Context->dbh; $|=1; # flushes output =item + Deal with virtualshelves + =cut my $DBversion = "3.00.00.001"; @@ -1378,10 +1380,20 @@ if (C4::Context->preference("Version") < TransformToNum($DBversion)) { SetVersion ($DBversion); } +$DBversion = "3.00.00.074"; +if (C4::Context->preference("Version") < TransformToNum($DBversion)) { + $dbh->do( q(update itemtypes set imageurl = concat( 'npl/', imageurl ) + where imageurl not like 'http%' + and imageurl is not NULL + and imageurl != '') ); + print "Upgrade to $DBversion done (updating imagetype.imageurls to reflect new icon locations.)\n"; + SetVersion ($DBversion); +} + =item DropAllForeignKeys($table) Drop all foreign keys of the table $table - + =cut sub DropAllForeignKeys { @@ -1410,7 +1422,7 @@ sub DropAllForeignKeys { Transform the Koha version from a 4 parts string to a number, with just 1 . - + =cut sub TransformToNum { @@ -1421,7 +1433,9 @@ sub TransformToNum { } =item SetVersion + set the DBversion in the systempreferences + =cut sub SetVersion { diff --git a/kohaversion.pl b/kohaversion.pl index 3e1346a63a..be48725a0c 100644 --- a/kohaversion.pl +++ b/kohaversion.pl @@ -10,7 +10,7 @@ use strict; sub kohaversion { - our $VERSION = "3.00.00.073"; + our $VERSION = "3.00.00.074"; # version needs to be set this way # so that it can be picked up by Makefile.PL # during install -- 2.39.5