koha-cvs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


From: paul poulain
Subject: [Koha-cvs] koha/updater updatedatabase [rel_2_2]
Date: Thu, 31 Aug 2006 14:37:04 +0000

CVSROOT:        /cvsroot/koha
Module name:    koha
Branch:         rel_2_2
Changes by:     paul poulain <tipaul>   06/08/31 14:37:04

Modified files:
        updater        : updatedatabase 

Log message:
        fix for :
        http://bugs.koha.org/cgi-bin/bugzilla/show_bug.cgi?id=1140
        (published date never null now)

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/koha/updater/updatedatabase?cvsroot=koha&only_with_tag=rel_2_2&r1=1.100.2.53&r2=1.100.2.54

Patches:
Index: updatedatabase
===================================================================
RCS file: /cvsroot/koha/koha/updater/updatedatabase,v
retrieving revision 1.100.2.53
retrieving revision 1.100.2.54
diff -u -b -r1.100.2.53 -r1.100.2.54
--- updatedatabase      9 Aug 2006 16:28:30 -0000       1.100.2.53
+++ updatedatabase      31 Aug 2006 14:37:04 -0000      1.100.2.54
@@ -1,6 +1,6 @@
 #!/usr/bin/perl
 
-# $Id: updatedatabase,v 1.100.2.53 2006/08/09 16:28:30 kados Exp $
+# $Id: updatedatabase,v 1.100.2.54 2006/08/31 14:37:04 tipaul Exp $
 
 # Database Updater
 # This script checks for required updates to the database.
@@ -2104,6 +2104,18 @@
         }
     }
 }
+
+
+#
+# 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};
@@ -2181,6 +2193,11 @@
 exit;
 
 # $Log: updatedatabase,v $
+# Revision 1.100.2.54  2006/08/31 14:37:04  tipaul
+# fix for :
+# http://bugs.koha.org/cgi-bin/bugzilla/show_bug.cgi?id=1140
+# (published date never null now)
+#
 # Revision 1.100.2.53  2006/08/09 16:28:30  kados
 # adds ReceiveBackIssues systempref with default set to 5
 #




reply via email to

[Prev in Thread] Current Thread [Next in Thread]