View | Details | Raw Unified | Return to bug 16955
Collapse All | Expand All

(-)a/admin/marctagstructure.pl (-6 / +7 lines)
Lines 342-347 sub StringSearch { Link Here
342
# the sub used to duplicate a framework from an existing one in MARC parameters tables.
342
# the sub used to duplicate a framework from an existing one in MARC parameters tables.
343
#
343
#
344
sub duplicate_framework {
344
sub duplicate_framework {
345
    my $cache = Koha::Cache->get_instance();
345
	my ($newframeworkcode,$oldframeworkcode) = @_;
346
	my ($newframeworkcode,$oldframeworkcode) = @_;
346
	my $dbh = C4::Context->dbh;
347
	my $dbh = C4::Context->dbh;
347
	my $sth = $dbh->prepare("select tagfield,liblibrarian,libopac,repeatable,mandatory,authorised_value from marc_tag_structure where frameworkcode=?");
348
	my $sth = $dbh->prepare("select tagfield,liblibrarian,libopac,repeatable,mandatory,authorised_value from marc_tag_structure where frameworkcode=?");
Lines 356-365 sub duplicate_framework { Link Here
356
	$sth_insert = $dbh->prepare("insert into marc_subfield_structure (frameworkcode,tagfield,tagsubfield,liblibrarian,libopac,repeatable,mandatory,kohafield,tab,authorised_value,authtypecode,value_builder,seealso,hidden) values (?,?,?,?,?,?,?,?,?,?,?,?,?,?)");
357
	$sth_insert = $dbh->prepare("insert into marc_subfield_structure (frameworkcode,tagfield,tagsubfield,liblibrarian,libopac,repeatable,mandatory,kohafield,tab,authorised_value,authtypecode,value_builder,seealso,hidden) values (?,?,?,?,?,?,?,?,?,?,?,?,?,?)");
357
	while ( my ($frameworkcode, $tagfield, $tagsubfield, $liblibrarian, $libopac, $repeatable, $mandatory, $kohafield, $tab, $authorised_value, $thesaurus_category, $value_builder, $seealso,$hidden) = $sth->fetchrow) {
358
	while ( my ($frameworkcode, $tagfield, $tagsubfield, $liblibrarian, $libopac, $repeatable, $mandatory, $kohafield, $tab, $authorised_value, $thesaurus_category, $value_builder, $seealso,$hidden) = $sth->fetchrow) {
358
	    $sth_insert->execute($newframeworkcode, $tagfield, $tagsubfield, $liblibrarian, $libopac, $repeatable, $mandatory, $kohafield, $tab, $authorised_value, $thesaurus_category, $value_builder, $seealso, $hidden);
359
	    $sth_insert->execute($newframeworkcode, $tagfield, $tagsubfield, $liblibrarian, $libopac, $repeatable, $mandatory, $kohafield, $tab, $authorised_value, $thesaurus_category, $value_builder, $seealso, $hidden);
359
	}
360
360
    $cache->clear_from_cache("MarcStructure-0-$newframeworkcode");
361
        $cache->clear_from_cache("MarcStructure-0-$newframeworkcode");
361
    $cache->clear_from_cache("MarcStructure-1-$newframeworkcode");
362
        $cache->clear_from_cache("MarcStructure-1-$newframeworkcode");
362
    $cache->clear_from_cache("default_value_for_mod_marc-$frameworkcode");
363
        $cache->clear_from_cache("default_value_for_mod_marc-$frameworkcode");
363
    $cache->clear_from_cache("MarcSubfieldStructure-$frameworkcode");
364
        $cache->clear_from_cache("MarcSubfieldStructure-$frameworkcode");
365
    }
364
}
366
}
365
367
366
- 

Return to bug 16955