Bug Fix : Creating a new authority type would fail on creating subfield_structure
authorHenri-Damien LAURENT <henridamien@koha-fr.org>
Tue, 20 May 2008 15:40:24 +0000 (17:40 +0200)
committerJoshua Ferraro <jmf@liblime.com>
Thu, 29 May 2008 12:16:53 +0000 (07:16 -0500)
removing "link" field which has been removed from table auth_subfield_structure
Removing a $dbh->disconnect

Signed-off-by: Joshua Ferraro <jmf@liblime.com>
admin/auth_subfields_structure.pl
admin/auth_tag_structure.pl

index f5002d9..a315055 100755 (executable)
@@ -42,7 +42,7 @@ sub StringSearch  {
                $u++;
        }
        $sth->finish;
-       $dbh->disconnect;
+#      $dbh->disconnect;
        return ($cnt,\@results);
 }
 
index 88bc762..dfca6de 100755 (executable)
@@ -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);
        }
 }