[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Koha-cvs] CVS: koha/admin marctagstructure.pl,1.17.2.1,1.17.2.2
From: |
MJ Ray |
Subject: |
[Koha-cvs] CVS: koha/admin marctagstructure.pl,1.17.2.1,1.17.2.2 |
Date: |
Mon, 05 Jan 2004 09:56:45 -0800 |
Update of /cvsroot/koha/koha/admin
In directory sc8-pr-cvs1:/tmp/cvs-serv3049/admin
Modified Files:
Tag: rel_2_0
marctagstructure.pl
Log Message:
DBI call fix for bug 662
Index: marctagstructure.pl
===================================================================
RCS file: /cvsroot/koha/koha/admin/marctagstructure.pl,v
retrieving revision 1.17.2.1
retrieving revision 1.17.2.2
diff -C2 -r1.17.2.1 -r1.17.2.2
*** marctagstructure.pl 30 Dec 2003 16:14:34 -0000 1.17.2.1
--- marctagstructure.pl 5 Jan 2004 17:56:43 -0000 1.17.2.2
***************
*** 35,50 ****
my @data=split(' ',$searchstring);
my address@hidden;
! my $query="Select
tagfield,liblibrarian,libopac,repeatable,mandatory,authorised_value from
marc_tag_structure where (tagfield >= $data[0]) order by tagfield";
! my $sth=$dbh->prepare($query);
! $sth->execute;
my @results;
- my $cnt=0;
while (my $data=$sth->fetchrow_hashref){
push(@results,$data);
- $cnt ++;
}
# $sth->execute;
$sth->finish;
! return ($cnt,address@hidden);
}
--- 35,47 ----
my @data=split(' ',$searchstring);
my address@hidden;
! my $sth=$dbh->prepare("Select
tagfield,liblibrarian,libopac,repeatable,mandatory,authorised_value from
marc_tag_structure where (tagfield >= ?) order by tagfield");
! $sth->execute($data[0]);
my @results;
while (my $data=$sth->fetchrow_hashref){
push(@results,$data);
}
# $sth->execute;
$sth->finish;
! return (scalar(@results),address@hidden);
}
***************
*** 52,57 ****
my $searchfield=$input->param('searchfield');
$searchfield=0 unless $searchfield;
- my $pkfield="tagfield";
- my $reqsel="select
tagfield,liblibrarian,libopac,repeatable,mandatory,authorised_value from
marc_tag_structure where $pkfield='$searchfield'";
my $offset=$input->param('offset');
my $script_name="/cgi-bin/koha/admin/marctagstructure.pl";
--- 49,52 ----
***************
*** 85,90 ****
my $data;
if ($searchfield) {
! my $sth=$dbh->prepare("select
tagfield,liblibrarian,libopac,repeatable,mandatory,authorised_value from
marc_tag_structure where $pkfield='$searchfield'");
! $sth->execute;
$data=$sth->fetchrow_hashref;
$sth->finish;
--- 80,85 ----
my $data;
if ($searchfield) {
! my $sth=$dbh->prepare("select
tagfield,liblibrarian,libopac,repeatable,mandatory,authorised_value from
marc_tag_structure where tagfield=?");
! $sth->execute($searchfield);
$data=$sth->fetchrow_hashref;
$sth->finish;
***************
*** 146,151 ****
} elsif ($op eq 'delete_confirm') {
my $dbh = C4::Context->dbh;
! my $sth=$dbh->prepare($reqsel);
! $sth->execute;
my $data=$sth->fetchrow_hashref;
$sth->finish;
--- 141,146 ----
} elsif ($op eq 'delete_confirm') {
my $dbh = C4::Context->dbh;
! my $sth=$dbh->prepare("select
tagfield,liblibrarian,libopac,repeatable,mandatory,authorised_value from
marc_tag_structure where tagfield=?");
! $sth->execute($searchfield);
my $data=$sth->fetchrow_hashref;
$sth->finish;
***************
*** 159,163 ****
my $dbh = C4::Context->dbh;
unless (C4::Context->config('demo') eq 1) {
! $dbh->do("delete from marc_tag_structure where
$pkfield='$searchfield'");
$dbh->do("delete from marc_subfield_structure where
tagfield='$searchfield'");
}
--- 154,158 ----
my $dbh = C4::Context->dbh;
unless (C4::Context->config('demo') eq 1) {
! $dbh->do("delete from marc_tag_structure where
tagfield='$searchfield'");
$dbh->do("delete from marc_subfield_structure where
tagfield='$searchfield'");
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Koha-cvs] CVS: koha/admin marctagstructure.pl,1.17.2.1,1.17.2.2,
MJ Ray <=