[Koha-cvs] koha/C4 Calendar.pm [rel_3_0]

Henri-Damien LAURENT laurenthdl at alinto.com
Tue Feb 27 16:35:44 CET 2007


CVSROOT:	/cvsroot/koha
Module name:	koha
Branch:		rel_3_0
Changes by:	Henri-Damien LAURENT <hdl>	07/02/27 15:35:44

Modified files:
	C4             : Calendar.pm 

Log message:
	BUGFIX : missing and in a SQL statement (cond part)
	+ missing simple quotes

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/koha/C4/Calendar.pm?cvsroot=koha&only_with_tag=rel_3_0&r1=1.1.2.3&r2=1.1.2.4

Patches:
Index: Calendar.pm
===================================================================
RCS file: /cvsroot/koha/koha/C4/Attic/Calendar.pm,v
retrieving revision 1.1.2.3
retrieving revision 1.1.2.4
diff -u -b -r1.1.2.3 -r1.1.2.4
--- Calendar.pm	25 Jan 2007 02:23:46 -0000	1.1.2.3
+++ Calendar.pm	27 Feb 2007 15:35:44 -0000	1.1.2.4
@@ -23,7 +23,7 @@
 # use Date::Calc;
 
 # set the version for version checking
-$VERSION = do { my @v = '$Revision: 1.1.2.3 $' =~ /\d+/g; shift(@v).".".join( "_", map { sprintf "%03d", $_ } @v ); };
+$VERSION = do { my @v = '$Revision: 1.1.2.4 $' =~ /\d+/g; shift(@v).".".join( "_", map { sprintf "%03d", $_ } @v ); };
 
 =head1 NAME
 
@@ -404,16 +404,16 @@
         } else {
             $isWeekdayHoliday->finish; # Close the last query
 
-            my $isDayMonthHoliday = $dbh->prepare("select id from repeatable_holidays where (branchcode = '$self->{branchcode}') (day = $options{day}) and (month = $options{month})");
+            my $isDayMonthHoliday = $dbh->prepare("select id from repeatable_holidays where (branchcode = '$self->{branchcode}') and (day = '$options{day}') and (month = '$options{month}')");
             $isDayMonthHoliday->execute;
             if ($isDayMonthHoliday->rows) {
                 my $id = $isDayMonthHoliday->fetchrow;
                 $isDayMonthHoliday->finish;
-                my $updateExceptions = $dbh->prepare("update special_holidays set isexception = 0 where (special_holidays.branchcode = '$self->{branchcode}') and (special_holidays.day = $options{day}) and (special_holidays.month = $options{month})");
+                my $updateExceptions = $dbh->prepare("update special_holidays set isexception = 0 where (special_holidays.branchcode = '$self->{branchcode}') and (special_holidays.day = '$options{day}') and (special_holidays.month = '$options{month}')");
                 $updateExceptions->execute;
                 $updateExceptions->finish; # Close the last query
 
-                my $deleteHoliday = $dbh->prepare("delete from repeatable_holidays where (id = $id)");
+                my $deleteHoliday = $dbh->prepare("delete from repeatable_holidays where (id = '$id')");
                 $deleteHoliday->execute;
                 $deleteHoliday->finish; # Close the last query
                 $isDayMonthHoliday->finish; # Close the last query





More information about the Koha-cvs mailing list