[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Koha-cvs] CVS: koha/admin marctagstructure.pl,1.3,1.4
From: |
Andrew Arensburger |
Subject: |
[Koha-cvs] CVS: koha/admin marctagstructure.pl,1.3,1.4 |
Date: |
Sat, 05 Oct 2002 03:03:01 -0700 |
Update of /cvsroot/koha/koha/admin
In directory usw-pr-cvs1:/tmp/cvs-serv26879/admin
Modified Files:
marctagstructure.pl
Log Message:
Merged with arensb-context branch: use C4::Context->dbh instead of
&C4Connect, and generally prefer C4::Context over C4::Database.
Index: marctagstructure.pl
===================================================================
RCS file: /cvsroot/koha/koha/admin/marctagstructure.pl,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -r1.3 -r1.4
*** marctagstructure.pl 14 Aug 2002 18:12:53 -0000 1.3
--- marctagstructure.pl 5 Oct 2002 10:02:59 -0000 1.4
***************
*** 20,31 ****
use strict;
- use C4::Output;
use CGI;
use C4::Search;
- use C4::Database;
sub StringSearch {
my ($env,$searchstring,$type)address@hidden;
! my $dbh = &C4Connect;
$searchstring=~ s/\'/\\\'/g;
my @data=split(' ',$searchstring);
--- 20,31 ----
use strict;
use CGI;
+ use C4::Context;
+ use C4::Output;
use C4::Search;
sub StringSearch {
my ($env,$searchstring,$type)address@hidden;
! my $dbh = C4::Context->dbh;
$searchstring=~ s/\'/\\\'/g;
my @data=split(' ',$searchstring);
***************
*** 42,46 ****
# $sth->execute;
$sth->finish;
- $dbh->disconnect;
return ($cnt,address@hidden);
}
--- 42,45 ----
***************
*** 69,73 ****
my $data;
if ($searchfield) {
! my $dbh = &C4Connect;
my $sth=$dbh->prepare("select
tagfield,liblibrarian,libopac,repeatable,mandatory from marc_tag_structure
where $pkfield='$searchfield'");
$sth->execute;
--- 68,72 ----
my $data;
if ($searchfield) {
! my $dbh = C4::Context->dbh;
my $sth=$dbh->prepare("select
tagfield,liblibrarian,libopac,repeatable,mandatory from marc_tag_structure
where $pkfield='$searchfield'");
$sth->execute;
***************
*** 159,163 ****
# called by add_form, used to insert/modify data in DB
} elsif ($op eq 'add_validate') {
! my $dbh=C4Connect;
my $query = "replace marc_tag_structure
(tagfield,liblibrarian,libopac,repeatable,mandatory) values (";
$query.= $dbh->quote($input->param('tagfield')).",";
--- 158,162 ----
# called by add_form, used to insert/modify data in DB
} elsif ($op eq 'add_validate') {
! my $dbh = C4::Context->dbh;
my $query = "replace marc_tag_structure
(tagfield,liblibrarian,libopac,repeatable,mandatory) values (";
$query.= $dbh->quote($input->param('tagfield')).",";
***************
*** 177,181 ****
# called by default form, used to confirm deletion of data in DB
} elsif ($op eq 'delete_confirm') {
! my $dbh = &C4Connect;
my $sth=$dbh->prepare($reqsel);
$sth->execute;
--- 176,180 ----
# called by default form, used to confirm deletion of data in DB
} elsif ($op eq 'delete_confirm') {
! my $dbh = C4::Context->dbh;
my $sth=$dbh->prepare($reqsel);
$sth->execute;
***************
*** 192,196 ****
# called by delete_confirm, used to effectively confirm deletion of data in DB
} elsif ($op eq 'delete_confirmed') {
! my $dbh=C4Connect;
# my $searchfield=$input->param('branchcode');
my $sth=$dbh->prepare($reqdel);
--- 191,195 ----
# called by delete_confirm, used to effectively confirm deletion of data in DB
} elsif ($op eq 'delete_confirmed') {
! my $dbh = C4::Context->dbh;
# my $searchfield=$input->param('branchcode');
my $sth=$dbh->prepare($reqdel);
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Koha-cvs] CVS: koha/admin marctagstructure.pl,1.3,1.4,
Andrew Arensburger <=