Bug 6931 : Only update frameworks for the correct marcflavour

Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
This commit is contained in:
Chris Cormack 2012-04-20 09:52:04 +12:00 committed by Paul Poulain
parent dad005a8a1
commit c606b53763

View file

@ -3975,9 +3975,12 @@ if (C4::Context->preference("Version") < TransformToNum($DBversion)) {
$DBversion = "3.03.00.015";
if ( C4::Context->preference("Version") < TransformToNum($DBversion) ) {
my $sth = $dbh->prepare("INSERT INTO `marc_subfield_structure` (`tagfield`, `tagsubfield`, `liblibrarian`, `libopac`, `repeatable`, `mandatory`, `kohafield`,
if ( C4::Context->preference("marcflavour") eq "MARC21" ) {
my $sth = $dbh->prepare(
"INSERT INTO `marc_subfield_structure` (`tagfield`, `tagsubfield`, `liblibrarian`, `libopac`, `repeatable`, `mandatory`, `kohafield`,
`tab`, `authorised_value`, `authtypecode`, `value_builder`, `isurl`, `hidden`, `frameworkcode`, `seealso`, `link`, `defaultvalue`)
VALUES ( ?, '9', '9 (RLIN)', '9 (RLIN)', 0, 0, '', 6, '', '', '', 0, -5, '', '', '', NULL)");
VALUES ( ?, '9', '9 (RLIN)', '9 (RLIN)', 0, 0, '', 6, '', '', '', 0, -5, '', '', '', NULL)"
);
$sth->execute('648');
$sth->execute('654');
$sth->execute('655');
@ -3986,7 +3989,9 @@ if (C4::Context->preference("Version") < TransformToNum($DBversion)) {
$sth->execute('658');
$sth->execute('662');
$sth->finish;
print "Upgrade to $DBversion done (Bug 5619: Add subfield 9 to marc21 648,654,655,656,657,658,662)\n";
print
"Upgrade to $DBversion done (Bug 5619: Add subfield 9 to marc21 648,654,655,656,657,658,662)\n";
}
SetVersion($DBversion);
}