From 54312e6661321e82b07eb5b9c86e25760e4c23c8 Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Fri, 22 Nov 2013 10:42:42 +0100 Subject: [PATCH] Bug 11286: FIX Add a new subfield to an authority frameworks Bug 10602 introduces a bug when adding a new subfield to an authority framework. A new parameter is added in a sql query but the placeholder is missing. Test plan: - edit an authority framework - add a new subfield - save - boom! DBD::mysql::st execute failed: called with 16 bind variables when 15 are needed at /home/home/src/admin/auth_subfields_structure.pl line 454. - apply the patch and try again --- admin/auth_subfields_structure.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/admin/auth_subfields_structure.pl b/admin/auth_subfields_structure.pl index d9f10b4..fb0e59c 100755 --- a/admin/auth_subfields_structure.pl +++ b/admin/auth_subfields_structure.pl @@ -388,7 +388,7 @@ if ($op eq 'add_form') { # my $sth=$dbh->prepare("replace auth_subfield_structure (authtypecode,tagfield,tagsubfield,liblibrarian,libopac,repeatable,mandatory,kohafield,tab,seealso,authorised_value,frameworkcode,value_builder,hidden,isurl) # values (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)"); my $sth_insert = $dbh->prepare("insert into auth_subfield_structure (authtypecode,tagfield,tagsubfield,liblibrarian,libopac,repeatable,mandatory,kohafield,tab,seealso,authorised_value,frameworkcode,value_builder,hidden,isurl,defaultvalue) - values (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)"); + values (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)"); my $sth_update = $dbh->prepare("update auth_subfield_structure set authtypecode=?, tagfield=?, tagsubfield=?, liblibrarian=?, libopac=?, repeatable=?, mandatory=?, kohafield=?, tab=?, seealso=?, authorised_value=?, frameworkcode=?, value_builder=?, hidden=?, isurl=?, defaultvalue=? where authtypecode=? and tagfield=? and tagsubfield=?"); my @tagsubfield = $input->param('tagsubfield'); -- 1.7.10.4