koha-cvs
[Top][All Lists]
Advanced

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

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


From: Ryan Higgins
Subject: [Koha-cvs] koha/C4/Calendar Calendar.pm [dev_week]
Date: Thu, 25 Jan 2007 02:30:11 +0000

CVSROOT:        /sources/koha
Module name:    koha
Branch:         dev_week
Changes by:     Ryan Higgins <rych>     07/01/25 02:30:11

Modified files:
        C4/Calendar    : Calendar.pm 

Log message:
        sync rel_3_0

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

Patches:
Index: Calendar.pm
===================================================================
RCS file: /sources/koha/koha/C4/Calendar/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 23 Jan 2007 09:50:24 -0000      1.1.2.3
+++ Calendar.pm 25 Jan 2007 02:30:11 -0000      1.1.2.4
@@ -1,4 +1,4 @@
-package C4::Calendar::Calendar;
+package C4::Calendar;
 
 # This file is part of Koha.
 #
@@ -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
 
@@ -84,7 +84,6 @@
 
 sub _init {
     my $self = shift @_;
-warn "Init calendar object. - branch:" . $self->{branchcode};
 
     my $dbh = C4::Context->dbh();
     my $week_days_sql = $dbh->prepare("select weekday, title, description from 
repeatable_holidays where ('$self->{branchcode}' = branchcode) and 
(NOT(ISNULL(weekday)))");
@@ -230,8 +229,8 @@
     my %options = @_;
 
     my $dbh = C4::Context->dbh();
-    my $insertHoliday = $dbh->prepare("insert into repeatable_holidays 
(id,branchcode,weekday,day,month,title,description) values ('', 
'$self->{branchcode}', $options{weekday}, NULL, NULL, '$options{title}', 
'$options{description}')");
-    $insertHoliday->execute;
+    my $insertHoliday = $dbh->prepare("insert into repeatable_holidays 
(id,branchcode,weekday,day,month,title,description) values ( 
'',?,?,NULL,NULL,?,? )"); 
+       $insertHoliday->execute( $self->{branchcode}, 
$options{weekday},$options{title}, $options{description});
     $insertHoliday->finish;
 
     $self->{'week_days_holidays'}->{$options{weekday}}{title} = 
$options{title};
@@ -263,8 +262,8 @@
     my %options = @_;
 
     my $dbh = C4::Context->dbh();
-    my $insertHoliday = $dbh->prepare("insert into repeatable_holidays 
(id,branchcode,weekday,day,month,title,description) values ('', 
'$self->{branchcode}', NULL, $options{day}, $options{month}, '$options{title}', 
'$options{description}')");
-    $insertHoliday->execute;
+    my $insertHoliday = $dbh->prepare("insert into repeatable_holidays 
(id,branchcode,weekday,day,month,title,description) values ('', ?, NULL, ?, ?, 
?,? )");
+       $insertHoliday->execute( $self->{branchcode}, 
$options{day},$options{month},$options{title}, $options{description});
     $insertHoliday->finish;
 
     $self->{'day_month_holidays'}->{"$options{month}/$options{day}"}{title} = 
$options{title};
@@ -300,8 +299,8 @@
 
     my $dbh = C4::Context->dbh();
     my $isexception = 0;
-    my $insertHoliday = $dbh->prepare("insert into special_holidays 
(id,branchcode,day,month,year,isexception,title,description) values ('', 
'$self->{branchcode}', $options{day}, $options{month}, $options{year}, 
$isexception, '$options{title}', '$options{description}')");
-    $insertHoliday->execute;
+    my $insertHoliday = $dbh->prepare("insert into special_holidays 
(id,branchcode,day,month,year,isexception,title,description) values ('', 
?,?,?,?,?,?,?)");
+       $insertHoliday->execute( $self->{branchcode}, 
$options{day},$options{month},$options{year}, $isexception, $options{title}, 
$options{description});
     $insertHoliday->finish;
 
     
$self->{'single_holidays'}->{"$options{year}/$options{month}/$options{day}"}{title}
 = $options{title};
@@ -337,8 +336,8 @@
 
     my $dbh = C4::Context->dbh();
     my $isexception = 1;
-    my $insertException = $dbh->prepare("insert into special_holidays 
(id,branchcode,day,month,year,isexception,title,description) values ('', 
'$self->{branchcode}', $options{day}, $options{month}, $options{year}, 
$isexception, '$options{title}', '$options{description}')");
-    $insertException->execute;
+    my $insertException = $dbh->prepare("insert into special_holidays 
(id,branchcode,day,month,year,isexception,title,description) values ('', 
?,?,?,?,?,?,?)");
+       $insertException->execute( $self->{branchcode}, 
$options{day},$options{month},$options{year}, $isexception, $options{title}, 
$options{description});
     $insertException->finish;
 
     
$self->{'exceptions_holidays'}->{"$options{year}/$options{month}/$options{day}"}{title}
 = $options{title};




reply via email to

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