|
Lines 159-173
if ((not defined $sourcesubfield) && (not defined $sourcetag)){
Link Here
|
| 159 |
|
159 |
|
| 160 |
# Disable logging for the biblios and authorities import operation. It would unnecessarily |
160 |
# Disable logging for the biblios and authorities import operation. It would unnecessarily |
| 161 |
# slow the import |
161 |
# slow the import |
| 162 |
|
162 |
$ENV{SYSPREF_OVERRIDE_CataloguingLog} = 0; |
| 163 |
# Disable the syspref cache so we can change logging settings |
163 |
$ENV{SYSPREF_OVERRIDE_AuthoritiesLog} = 0; |
| 164 |
C4::Context->disable_syspref_cache(); |
|
|
| 165 |
# Save current CataloguingLog and AuthoritiesLog sysprefs values |
| 166 |
my $CataloguingLog = C4::Context->preference( 'CataloguingLog' ); |
| 167 |
my $AuthoritiesLog = C4::Context->preference( 'AuthoritiesLog' ); |
| 168 |
# Disable logging for both |
| 169 |
C4::Context->set_preference( 'CataloguingLog', 0 ); |
| 170 |
C4::Context->set_preference( 'AuthoritiesLog', 0 ); |
| 171 |
|
164 |
|
| 172 |
if ($fk_off) { |
165 |
if ($fk_off) { |
| 173 |
$dbh->do("SET FOREIGN_KEY_CHECKS = 0"); |
166 |
$dbh->do("SET FOREIGN_KEY_CHECKS = 0"); |
|
Lines 564-573
if ($fk_off) {
Link Here
|
| 564 |
$dbh->do("SET FOREIGN_KEY_CHECKS = 1"); |
557 |
$dbh->do("SET FOREIGN_KEY_CHECKS = 1"); |
| 565 |
} |
558 |
} |
| 566 |
|
559 |
|
| 567 |
# Restore CataloguingLog |
560 |
# Restore CataloguingLog and AuthoritiesLog |
| 568 |
C4::Context->set_preference( 'CataloguingLog', $CataloguingLog ); |
561 |
delete $ENV{SYSPREF_OVERRIDE_CataloguingLog}; |
| 569 |
# Restore AuthoritiesLog |
562 |
delete $ENV{SYSPREF_OVERRIDE_AuthoritiesLog}; |
| 570 |
C4::Context->set_preference( 'AuthoritiesLog', $AuthoritiesLog ); |
|
|
| 571 |
|
563 |
|
| 572 |
my $timeneeded = gettimeofday - $starttime; |
564 |
my $timeneeded = gettimeofday - $starttime; |
| 573 |
print "\n$i MARC records done in $timeneeded seconds\n"; |
565 |
print "\n$i MARC records done in $timeneeded seconds\n"; |
| 574 |
- |
|
|