[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Koha-cvs] CVS: koha/C4 Maintainance.pm,1.7,1.8
From: |
Andrew Arensburger |
Subject: |
[Koha-cvs] CVS: koha/C4 Maintainance.pm,1.7,1.8 |
Date: |
Sat, 05 Oct 2002 02:51:37 -0700 |
Update of /cvsroot/koha/koha/C4
In directory usw-pr-cvs1:/tmp/cvs-serv22224/C4
Modified Files:
Maintainance.pm
Log Message:
Merged with arensb-context branch: use C4::Context->dbh instead of
&C4Connect, and generally prefer C4::Context over C4::Database.
Index: Maintainance.pm
===================================================================
RCS file: /cvsroot/koha/koha/C4/Maintainance.pm,v
retrieving revision 1.7
retrieving revision 1.8
diff -C2 -r1.7 -r1.8
*** Maintainance.pm 23 Sep 2002 13:54:34 -0000 1.7
--- Maintainance.pm 5 Oct 2002 09:51:35 -0000 1.8
***************
*** 22,26 ****
use strict;
! use C4::Database;
require Exporter;
--- 22,26 ----
use strict;
! use C4::Context;
require Exporter;
***************
*** 79,83 ****
sub listsubjects {
my ($sub,$num,$offset)address@hidden;
! my $dbh=C4Connect;
my $query="Select * from bibliosubject where subject like '$sub%' group by
subject";
# FIXME - Make $num and $offset optional.
--- 79,83 ----
sub listsubjects {
my ($sub,$num,$offset)address@hidden;
! my $dbh = C4::Context->dbh;
my $query="Select * from bibliosubject where subject like '$sub%' group by
subject";
# FIXME - Make $num and $offset optional.
***************
*** 96,100 ****
}
$sth->finish;
- $dbh->disconnect;
return($i,address@hidden);
}
--- 96,99 ----
***************
*** 111,122 ****
sub updatesub{
my ($sub,$oldsub)address@hidden;
! my $dbh=C4Connect;
$sub=$dbh->quote($sub);
$oldsub=$dbh->quote($oldsub);
my $query="update bibliosubject set subject=$sub where subject=$oldsub";
my $sth=$dbh->prepare($query);
$sth->execute;
$sth->finish;
- $dbh->disconnect;
}
--- 110,121 ----
sub updatesub{
my ($sub,$oldsub)address@hidden;
! my $dbh = C4::Context->dbh;
$sub=$dbh->quote($sub);
$oldsub=$dbh->quote($oldsub);
+ # FIXME - Just use $dbh->do();
my $query="update bibliosubject set subject=$sub where subject=$oldsub";
my $sth=$dbh->prepare($query);
$sth->execute;
$sth->finish;
}
***************
*** 133,146 ****
sub shiftgroup{
my ($bib,$bi)address@hidden;
! my $dbh=C4Connect;
my $query="update biblioitems set biblionumber=$bib where
biblioitemnumber=$bi";
my $sth=$dbh->prepare($query);
$sth->execute;
$sth->finish;
$query="update items set biblionumber=$bib where biblioitemnumber=$bi";
$sth=$dbh->prepare($query);
$sth->execute;
$sth->finish;
- $dbh->disconnect;
}
--- 132,146 ----
sub shiftgroup{
my ($bib,$bi)address@hidden;
! my $dbh = C4::Context->dbh;
! # FIXME - Just use $dbh->do();
my $query="update biblioitems set biblionumber=$bib where
biblioitemnumber=$bi";
my $sth=$dbh->prepare($query);
$sth->execute;
$sth->finish;
+ # FIXME - Just use $dbh->do();
$query="update items set biblionumber=$bib where biblioitemnumber=$bi";
$sth=$dbh->prepare($query);
$sth->execute;
$sth->finish;
}
***************
*** 160,164 ****
sub deletedbib{
my ($title)address@hidden;
! my $dbh=C4Connect;
my $query="Select * from deletedbiblio where title like '$title%' order by
title";
my $sth=$dbh->prepare($query);
--- 160,164 ----
sub deletedbib{
my ($title)address@hidden;
! my $dbh = C4::Context->dbh;
my $query="Select * from deletedbiblio where title like '$title%' order by
title";
my $sth=$dbh->prepare($query);
***************
*** 171,175 ****
}
$sth->finish;
- $dbh->disconnect;
return($i,address@hidden);
}
--- 171,174 ----
***************
*** 187,191 ****
sub undeletebib{
my ($bib)address@hidden;
! my $dbh=C4Connect;
my $query="select * from deletedbiblio where biblionumber=$bib";
my $sth=$dbh->prepare($query);
--- 186,190 ----
sub undeletebib{
my ($bib)address@hidden;
! my $dbh = C4::Context->dbh;
my $query="select * from deletedbiblio where biblionumber=$bib";
my $sth=$dbh->prepare($query);
***************
*** 210,214 ****
$sth->execute;
$sth->finish;
- $dbh->disconnect;
}
--- 209,212 ----
***************
*** 224,233 ****
sub updatetype{
my ($bi,$type)address@hidden;
! my $dbh=C4Connect;
# FIXME - Use $dbh->do(...);
my $sth=$dbh->prepare("Update biblioitems set itemtype='$type' where
biblioitemnumber=$bi");
$sth->execute;
$sth->finish;
- $dbh->disconnect;
}
--- 222,230 ----
sub updatetype{
my ($bi,$type)address@hidden;
! my $dbh = C4::Context->dbh;
# FIXME - Use $dbh->do(...);
my $sth=$dbh->prepare("Update biblioitems set itemtype='$type' where
biblioitemnumber=$bi");
$sth->execute;
$sth->finish;
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Koha-cvs] CVS: koha/C4 Maintainance.pm,1.7,1.8,
Andrew Arensburger <=