Lines 69-84
if( CheckVersion( $DBversion ) ) {
Link Here
|
69 |
}); |
69 |
}); |
70 |
|
70 |
|
71 |
if (C4::Context->preference("marcflavour") eq 'MARC21') { |
71 |
if (C4::Context->preference("marcflavour") eq 'MARC21') { |
|
|
72 |
|
72 |
# items.holding_id in the default framework |
73 |
# items.holding_id in the default framework |
73 |
$dbh->do(q{ |
74 |
$dbh->do(q{ |
74 |
INSERT IGNORE INTO `marc_subfield_structure` (`tagfield`, `tagsubfield`, `liblibrarian`, `libopac`, `repeatable`, `mandatory`, `kohafield`, `tab`, `authorised_value`, `authtypecode`, `value_builder`, `isurl`, `hidden`, `frameworkcode`, `seealso`, `link`, `defaultvalue`) VALUES |
75 |
INSERT IGNORE INTO `marc_subfield_structure` (`tagfield`, `tagsubfield`, `liblibrarian`, `libopac`, `repeatable`, `mandatory`, `kohafield`, `tab`, `authorised_value`, `authtypecode`, `value_builder`, `isurl`, `hidden`, `frameworkcode`, `seealso`, `link`, `defaultvalue`) VALUES |
75 |
('952', 'k', 'Holdings record', 'Holdings record', 0, 0, 'items.holding_id', 10, 'holdings', '', '', NULL, -1, '', '', '', NULL); |
76 |
('952', 'k', 'Holdings record', 'Holdings record', 0, 0, 'items.holding_id', 10, 'holdings', '', '', NULL, -1, '', '', '', NULL); |
76 |
}); |
77 |
}); |
|
|
78 |
|
77 |
# items.holding_id in the ACQ framework |
79 |
# items.holding_id in the ACQ framework |
78 |
$dbh->do(q{ |
80 |
# add only if ACQ framework exists: |
79 |
INSERT IGNORE INTO `marc_subfield_structure` (`tagfield`, `tagsubfield`, `liblibrarian`, `libopac`, `repeatable`, `mandatory`, `kohafield`, `tab`, `authorised_value`, `authtypecode`, `value_builder`, `isurl`, `hidden`, `frameworkcode`, `seealso`, `link`, `defaultvalue`) VALUES |
81 |
my $sth = $dbh->prepare("SELECT COUNT(1) FROM `biblio_framework` WHERE frameworkcode = 'ACQ'"); |
80 |
('952', 'k', 'Holdings record', 'Holdings record', 0, 0, 'items.holding_id', 10, 'holdings', '', '', NULL, -1, 'ACQ', '', '', NULL); |
82 |
$sth->execute; |
81 |
}); |
83 |
my ($value) = $sth->fetchrow; |
|
|
84 |
if($value == 1) { |
85 |
$dbh->do(q{ |
86 |
INSERT IGNORE INTO `marc_subfield_structure` (`tagfield`, `tagsubfield`, `liblibrarian`, `libopac`, `repeatable`, `mandatory`, `kohafield`, `tab`, `authorised_value`, `authtypecode`, `value_builder`, `isurl`, `hidden`, `frameworkcode`, `seealso`, `link`, `defaultvalue`) VALUES |
87 |
('952', 'k', 'Holdings record', 'Holdings record', 0, 0, 'items.holding_id', 10, 'holdings', '', '', NULL, -1, 'ACQ', '', '', NULL); |
88 |
}); |
89 |
} |
90 |
else { |
91 |
|
92 |
} |
82 |
|
93 |
|
83 |
# Holdings framework |
94 |
# Holdings framework |
84 |
$dbh->do(q{ |
95 |
$dbh->do(q{ |
85 |
- |
|
|