From 8b9a04269aad536e2924def168370b49b6fcb7ac Mon Sep 17 00:00:00 2001 From: Henri-Damien LAURENT Date: Tue, 20 May 2008 17:40:24 +0200 Subject: [PATCH] Bug Fix : Creating a new authority type would fail on creating subfield_structure removing "link" field which has been removed from table auth_subfield_structure Removing a $dbh->disconnect Signed-off-by: Joshua Ferraro --- admin/auth_subfields_structure.pl | 2 +- admin/auth_tag_structure.pl | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/admin/auth_subfields_structure.pl b/admin/auth_subfields_structure.pl index f5002d902c..a3150553d1 100755 --- a/admin/auth_subfields_structure.pl +++ b/admin/auth_subfields_structure.pl @@ -42,7 +42,7 @@ sub StringSearch { $u++; } $sth->finish; - $dbh->disconnect; +# $dbh->disconnect; return ($cnt,\@results); } diff --git a/admin/auth_tag_structure.pl b/admin/auth_tag_structure.pl index 88bc7625ab..dfca6de402 100755 --- a/admin/auth_tag_structure.pl +++ b/admin/auth_tag_structure.pl @@ -310,11 +310,11 @@ sub duplicate_auth_framework { $sth_insert->execute($tagfield,$liblibrarian,$libopac,$repeatable,$mandatory,$authorised_value,$newauthtype); } - $sth = $dbh->prepare("select tagfield,tagsubfield,liblibrarian,libopac,repeatable,mandatory,kohafield,tab,authorised_value,value_builder,seealso,hidden,link from auth_subfield_structure where authtypecode=?"); + $sth = $dbh->prepare("select tagfield,tagsubfield,liblibrarian,libopac,repeatable,mandatory,kohafield,tab,authorised_value,value_builder,seealso,hidden from auth_subfield_structure where authtypecode=?"); $sth->execute($oldauthtype); - $sth_insert = $dbh->prepare("insert into auth_subfield_structure (authtypecode,tagfield,tagsubfield,liblibrarian,libopac,repeatable,mandatory,kohafield,tab,authorised_value,value_builder,seealso,hidden,link) values (?,?,?,?,?,?,?,?,?,?,?,?,?,?)"); - while ( my ( $tagfield, $tagsubfield, $liblibrarian, $libopac, $repeatable, $mandatory, $kohafield,$tab, $authorised_value, $thesaurus_category, $seealso,$hidden,$link) = $sth->fetchrow) { - $sth_insert->execute($newauthtype, $tagfield, $tagsubfield, $liblibrarian, $libopac, $repeatable, $mandatory,$kohafield, $tab, $authorised_value, $thesaurus_category, $seealso,$hidden,$link); + $sth_insert = $dbh->prepare("insert into auth_subfield_structure (authtypecode,tagfield,tagsubfield,liblibrarian,libopac,repeatable,mandatory,kohafield,tab,authorised_value,value_builder,seealso,hidden) values (?,?,?,?,?,?,?,?,?,?,?,?,?)"); + while ( my ( $tagfield, $tagsubfield, $liblibrarian, $libopac, $repeatable, $mandatory, $kohafield,$tab, $authorised_value, $thesaurus_category, $seealso,$hidden) = $sth->fetchrow) { + $sth_insert->execute($newauthtype, $tagfield, $tagsubfield, $liblibrarian, $libopac, $repeatable, $mandatory,$kohafield, $tab, $authorised_value, $thesaurus_category, $seealso,$hidden); } } -- 2.39.2