[Koha-cvs] CVS: koha/admin marc_subfields_structure.pl,1.16,1.16.2.1

MJ Ray slef at users.sourceforge.net
Tue Dec 23 15:38:36 CET 2003


Update of /cvsroot/koha/koha/admin
In directory sc8-pr-cvs1:/tmp/cvs-serv15029/admin

Modified Files:
      Tag: rel_2_0
	marc_subfields_structure.pl 
Log Message:
DBI call fix for bug 662

Index: marc_subfields_structure.pl
===================================================================
RCS file: /cvsroot/koha/koha/admin/marc_subfields_structure.pl,v
retrieving revision 1.16
retrieving revision 1.16.2.1
diff -C2 -r1.16 -r1.16.2.1
*** marc_subfields_structure.pl	1 Aug 2003 14:25:12 -0000	1.16
--- marc_subfields_structure.pl	23 Dec 2003 14:38:33 -0000	1.16.2.1
***************
*** 34,40 ****
  	my @data=split(' ',$searchstring);
  	my $count=@data;
! 	my $query="Select tagfield,tagsubfield,liblibrarian,libopac,repeatable,mandatory,kohafield,tab,authorised_value,thesaurus_category,value_builder from marc_subfield_structure where (tagfield like \"$searchstring%\") order by tagfield";
! 	my $sth=$dbh->prepare($query);
! 	$sth->execute;
  	my @results;
  	my $cnt=0;
--- 34,39 ----
  	my @data=split(' ',$searchstring);
  	my $count=@data;
! 	my $sth=$dbh->prepare("Select tagfield,tagsubfield,liblibrarian,libopac,repeatable,mandatory,kohafield,tab,authorised_value,thesaurus_category,value_builder from marc_subfield_structure where (tagfield like ?) order by tagfield");
! 	$sth->execute("$searchstring%");
  	my @results;
  	my $cnt=0;
***************
*** 53,58 ****
  my $tagsubfield=$input->param('tagsubfield');
  my $pkfield="tagfield";
- my $reqsel="select tagfield,tagsubfield,liblibrarian,libopac,repeatable,mandatory,kohafield,tab,authorised_value,thesaurus_category,value_builder from marc_subfield_structure where tagfield='$tagfield' and tagsubfield='$tagsubfield'";
- my $reqdel="delete from marc_subfield_structure where tagfield='$tagfield' and tagsubfield='$tagsubfield'";
  my $offset=$input->param('offset');
  my $script_name="/cgi-bin/koha/admin/marc_subfields_structure.pl";
--- 52,55 ----
***************
*** 141,146 ****
  
  	# build values list
! 	my $sth=$dbh->prepare("select tagfield,tagsubfield,liblibrarian,libopac,repeatable,mandatory,kohafield,tab,authorised_value,thesaurus_category,value_builder from marc_subfield_structure where tagfield='$tagfield'"); # and tagsubfield='$tagsubfield'");
! 	$sth->execute;
  	my @loop_data = ();
  	my $toggle="white";
--- 138,143 ----
  
  	# build values list
! 	my $sth=$dbh->prepare("select tagfield,tagsubfield,liblibrarian,libopac,repeatable,mandatory,kohafield,tab,authorised_value,thesaurus_category,value_builder from marc_subfield_structure where tagfield=?"); # and tagsubfield='$tagsubfield'");
! 	$sth->execute($tagfield);
  	my @loop_data = ();
  	my $toggle="white";
***************
*** 296,301 ****
  } elsif ($op eq 'delete_confirm') {
  	my $dbh = C4::Context->dbh;
! 	my $sth=$dbh->prepare($reqsel);
! 	$sth->execute;
  	my $data=$sth->fetchrow_hashref;
  	$sth->finish;
--- 293,298 ----
  } elsif ($op eq 'delete_confirm') {
  	my $dbh = C4::Context->dbh;
! 	my $sth=$dbh->prepare("select tagfield,tagsubfield,liblibrarian,libopac,repeatable,mandatory,kohafield,tab,authorised_value,thesaurus_category,value_builder from marc_subfield_structure where tagfield=? and tagsubfield=?");
! 	$sth->execute($tagfield,$tagsubfield);
  	my $data=$sth->fetchrow_hashref;
  	$sth->finish;
***************
*** 312,317 ****
  	my $dbh = C4::Context->dbh;
  	unless (C4::Context->config('demo') eq 1) {
! 		my $sth=$dbh->prepare($reqdel);
! 		$sth->execute;
  		$sth->finish;
  	}
--- 309,314 ----
  	my $dbh = C4::Context->dbh;
  	unless (C4::Context->config('demo') eq 1) {
! 		my $sth=$dbh->prepare("delete from marc_subfield_structure where tagfield=? and tagsubfield=?");
! 		$sth->execute($tagfield,$tagsubfield);
  		$sth->finish;
  	}





More information about the Koha-cvs mailing list