bug 2044: adding database change for itemtype icon change
authorAndrew Moore <andrew.moore@liblime.com>
Thu, 24 Apr 2008 16:34:26 +0000 (11:34 -0500)
committerJoshua Ferraro <jmf@liblime.com>
Thu, 24 Apr 2008 16:54:20 +0000 (11:54 -0500)
This is the database update change to take into account the rearrangement of the
itemtype icons directory.

Signed-off-by: Joshua Ferraro <jmf@liblime.com>
installer/data/mysql/updatedatabase.pl
kohaversion.pl

index dd18d70..03f55e8 100755 (executable)
@@ -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 {
index 3e1346a..be48725 100644 (file)
@@ -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