Lines 17-31
if( CheckVersion( $DBversion ) ) {
Link Here
|
17 |
my $marcflavour = C4::Context->preference('marcflavour'); |
17 |
my $marcflavour = C4::Context->preference('marcflavour'); |
18 |
|
18 |
|
19 |
if ( $marcflavour eq 'UNIMARC' ) { |
19 |
if ( $marcflavour eq 'UNIMARC' ) { |
20 |
$dbh->do( "UPDATE marc_subfield_structure SET kohafield='biblio.medium' WHERE frameworkcode='' AND tagfield='200' AND tagsubfield='b'" ); |
20 |
$dbh->do(qq{ |
21 |
$dbh->do( "UPDATE marc_subfield_structure SET kohafield='biblio.subtitle' WHERE frameworkcode='' AND tagfield='200' AND tagsubfield='e'" ); |
21 |
UPDATE marc_subfield_structure SET kohafield='biblio.medium' |
22 |
$dbh->do( "UPDATE marc_subfield_structure SET kohafield='biblio.part_number' WHERE frameworkcode='' AND tagfield='200' AND tagsubfield='h'" ); |
22 |
WHERE (kohafield IS NULL OR kohafield='') AND frameworkcode='' AND tagfield='200' AND tagsubfield='b' |
23 |
$dbh->do( "UPDATE marc_subfield_structure SET kohafield='biblio.part_name' WHERE frameworkcode='' AND tagfield='200' AND tagsubfield='i'" ); |
23 |
}); |
|
|
24 |
$dbh->do(qq{ |
25 |
UPDATE marc_subfield_structure SET kohafield='biblio.subtitle' |
26 |
WHERE (kohafield IS NULL OR kohafield='') AND frameworkcode='' AND tagfield='200' AND tagsubfield='e' |
27 |
}); |
28 |
$dbh->do(qq{ |
29 |
UPDATE marc_subfield_structure SET kohafield='biblio.part_number' |
30 |
WHERE (kohafield IS NULL OR kohafield='') AND frameworkcode='' AND tagfield='200' AND tagsubfield='h' |
31 |
}); |
32 |
$dbh->do(qq{ |
33 |
UPDATE marc_subfield_structure SET kohafield='biblio.part_name' |
34 |
WHERE (kohafield IS NULL OR kohafield='') AND frameworkcode='' AND tagfield='200' AND tagsubfield='i' |
35 |
}); |
24 |
} else { |
36 |
} else { |
25 |
$dbh->do( "UPDATE marc_subfield_structure SET kohafield='biblio.medium' WHERE frameworkcode='' AND tagfield='245' AND tagsubfield='h'" ); |
37 |
$dbh->do(qq{ |
26 |
$dbh->do( "UPDATE marc_subfield_structure SET kohafield='biblio.subtitle' WHERE frameworkcode='' AND tagfield='245' AND tagsubfield='b'" ); |
38 |
UPDATE marc_subfield_structure SET kohafield='biblio.medium' |
27 |
$dbh->do( "UPDATE marc_subfield_structure SET kohafield='biblio.part_number' WHERE frameworkcode='' AND tagfield='245' AND tagsubfield='n'" ); |
39 |
WHERE (kohafield IS NULL OR kohafield='') AND frameworkcode='' AND tagfield='245' AND tagsubfield='h' |
28 |
$dbh->do( "UPDATE marc_subfield_structure SET kohafield='biblio.part_name' WHERE frameworkcode='' AND tagfield='245' AND tagsubfield='p'" ); |
40 |
}); |
|
|
41 |
$dbh->do(qq{ |
42 |
UPDATE marc_subfield_structure SET kohafield='biblio.subtitle' |
43 |
WHERE (kohafield IS NULL OR kohafield='') AND frameworkcode='' AND tagfield='245' AND tagsubfield='b' |
44 |
}); |
45 |
$dbh->do(qq{ |
46 |
UPDATE marc_subfield_structure SET kohafield='biblio.part_number' |
47 |
WHERE (kohafield IS NULL OR kohafield='') AND frameworkcode='' AND tagfield='245' AND tagsubfield='n' |
48 |
}); |
49 |
$dbh->do(qq{ |
50 |
UPDATE marc_subfield_structure SET kohafield='biblio.part_name' |
51 |
WHERE (kohafield IS NULL OR kohafield='') AND frameworkcode='' AND tagfield='245' AND tagsubfield='p' |
52 |
}); |
29 |
} |
53 |
} |
30 |
|
54 |
|
31 |
$dbh->do( "DROP TABLE IF EXISTS fieldmapping" ); |
55 |
$dbh->do( "DROP TABLE IF EXISTS fieldmapping" ); |
32 |
- |
|
|