[Koha-cvs] koha/updater updatedatabase [rel_3_0]

Antoine Farnault antoine at koha-fr.org
Mon Sep 4 10:39:14 CEST 2006


CVSROOT:	/sources/koha
Module name:	koha
Branch:		rel_3_0
Changes by:	Antoine Farnault <toins>	06/09/04 08:39:14

Modified files:
	updater        : updatedatabase 

Log message:
	sync with rel_2_2.

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/koha/updater/updatedatabase?cvsroot=koha&only_with_tag=rel_3_0&r1=1.157&r2=1.157.2.1

Patches:
Index: updatedatabase
===================================================================
RCS file: /sources/koha/koha/updater/updatedatabase,v
retrieving revision 1.157
retrieving revision 1.157.2.1
diff -u -b -r1.157 -r1.157.2.1
--- updatedatabase	11 Aug 2006 10:03:13 -0000	1.157
+++ updatedatabase	4 Sep 2006 08:39:14 -0000	1.157.2.1
@@ -1,6 +1,6 @@
 #!/usr/bin/perl
 
-# $Id: updatedatabase,v 1.157 2006/08/11 10:03:13 tipaul Exp $
+# $Id: updatedatabase,v 1.157.2.1 2006/09/04 08:39:14 toins Exp $
 
 # Database Updater
 # This script checks for required updates to the database.
@@ -1265,7 +1265,16 @@
 		}
 	}
 }
-
+#
+# update publisheddate 
+#
+$sth = $dbh->prepare("select count(*) from serial where publisheddate is NULL");
+$sth->execute;
+my ($emptypublished) = $sth->fetchrow;
+if ($emptypublished) {
+    print "Updating publisheddate\n";
+    $dbh->do("update serial set publisheddate=planneddate where publisheddate is NULL");
+}
 foreach my $table ( keys %tabledata ) {
     print "Checking for data required in table $table...\n" unless $silent;
     my $tablerows = $tabledata{$table};
@@ -1669,6 +1678,9 @@
 exit;
 
 # $Log: updatedatabase,v $
+# Revision 1.157.2.1  2006/09/04 08:39:14  toins
+# sync with rel_2_2.
+#
 # Revision 1.157  2006/08/11 10:03:13  tipaul
 # the new "includes" features, for personalized templates. Look at koha-devel, i'll write a mail here (& something on the wiki)
 #





More information about the Koha-cvs mailing list