Revert "Bug 17232: Make sure all fields are copies when creating a new framework from another"

This reverts commit a3569d3217.

Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
This commit is contained in:
Victor Grousset/tuxayo 2020-06-20 17:16:16 +02:00
parent 5bea72de4b
commit d9a6710761
1 changed files with 6 additions and 6 deletions

View File

@ -327,13 +327,13 @@ sub StringSearch {
# the sub used to duplicate a framework from an existing one in MARC parameters tables.
#
sub duplicate_framework {
my ($newframeworkcode,$oldframeworkcode) = @_;
my $dbh = C4::Context->dbh;
$dbh->do(q|INSERT INTO marc_tag_structure (tagfield, liblibrarian, libopac, repeatable, mandatory, important, authorised_value, ind1_defaultvalue, ind2_defaultvalue, frameworkcode)
SELECT tagfield,liblibrarian,libopac,repeatable,mandatory,important,authorised_value, ind1_defaultvalue, ind2_defaultvalue, ? from marc_tag_structure where frameworkcode=?|, undef, $newframeworkcode, $oldframeworkcode );
my ($newframeworkcode,$oldframeworkcode) = @_;
my $dbh = C4::Context->dbh;
$dbh->do(q|INSERT INTO marc_tag_structure (tagfield, liblibrarian, libopac, repeatable, mandatory, authorised_value, ind1_defaultvalue, ind2_defaultvalue, frameworkcode)
SELECT tagfield,liblibrarian,libopac,repeatable,mandatory,authorised_value, ind1_defaultvalue, ind2_defaultvalue, ? from marc_tag_structure where frameworkcode=?|, undef, $newframeworkcode, $oldframeworkcode );
$dbh->do(q|INSERT INTO marc_subfield_structure (frameworkcode,tagfield,tagsubfield,liblibrarian,libopac,repeatable,mandatory,important,kohafield,tab,authorised_value,authtypecode,value_builder,isurl,seealso,hidden,link,defaultvalue,maxlength)
SELECT ?,tagfield,tagsubfield,liblibrarian,libopac,repeatable,mandatory,important,kohafield,tab,authorised_value,authtypecode,value_builder,isurl,seealso,hidden,link,defaultvalue,maxlength from marc_subfield_structure where frameworkcode=?
$dbh->do(q|INSERT INTO marc_subfield_structure (frameworkcode,tagfield,tagsubfield,liblibrarian,libopac,repeatable,mandatory,kohafield,tab,authorised_value,authtypecode,value_builder,seealso,hidden)
SELECT ?,tagfield,tagsubfield,liblibrarian,libopac,repeatable,mandatory,kohafield,tab,authorised_value,authtypecode,value_builder,seealso,hidden from marc_subfield_structure where frameworkcode=?
|, undef, $newframeworkcode, $oldframeworkcode );
}