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

(-)a/C4/UsageStats.pm (-1 / +2 lines)
Lines 96-102 sub BuildReport { Link Here
96
        AuthDisplayHierarchy
96
        AuthDisplayHierarchy
97
        AutoCreateAuthorities
97
        AutoCreateAuthorities
98
        BiblioAddsAuthorities
98
        BiblioAddsAuthorities
99
        dontmerge
99
        AuthorityMergeLimit
100
        AuthorityMergeMode
100
        UseAuthoritiesForTracings
101
        UseAuthoritiesForTracings
101
        CatalogModuleRelink
102
        CatalogModuleRelink
102
        hide_marc
103
        hide_marc
(-)a/authorities/merge.pl (-1 lines)
Lines 62-68 if ($merge) { Link Here
62
    ModAuthority( $recordid1, $record, $typecode );
62
    ModAuthority( $recordid1, $record, $typecode );
63
63
64
    # Now merge for biblios attached to $recordid2
64
    # Now merge for biblios attached to $recordid2
65
    # We ignore dontmerge now, since recordid2 is deleted
66
    my $MARCfrom = GetAuthority( $recordid2 );
65
    my $MARCfrom = GetAuthority( $recordid2 );
67
    merge({ mergefrom => $recordid2, MARCfrom => $MARCfrom, mergeto => $recordid1, MARCto => $record });
66
    merge({ mergefrom => $recordid2, MARCfrom => $MARCfrom, mergeto => $recordid1, MARCto => $record });
68
67
(-)a/misc/batchRebuildItemsTables.pl (-10 / +4 lines)
Lines 52-61 $dbh->{AutoCommit} = 0; Link Here
52
#sysprefs
52
#sysprefs
53
C4::Context->disable_syspref_cache() if ( defined( C4::Context->disable_syspref_cache() ) );
53
C4::Context->disable_syspref_cache() if ( defined( C4::Context->disable_syspref_cache() ) );
54
my $CataloguingLog = C4::Context->preference('CataloguingLog');
54
my $CataloguingLog = C4::Context->preference('CataloguingLog');
55
my $dontmerge      = C4::Context->preference('dontmerge');
55
my $mergelimit     = C4::Context->preference('AuthorityMergeLimit');
56
$dontmerge = "0" unless defnonull($dontmerge);
57
$dbh->do("UPDATE systempreferences SET value=0 WHERE variable='CataloguingLog'");
56
$dbh->do("UPDATE systempreferences SET value=0 WHERE variable='CataloguingLog'");
58
$dbh->do("UPDATE systempreferences SET value=1 where variable='dontmerge'");
57
$dbh->do("UPDATE systempreferences SET value=0 where variable='AuthorityMergeLimit'");
59
$dbh->commit() unless $test_parameter;
58
$dbh->commit() unless $test_parameter;
60
my ( $itemfield, $itemnumbersubfield ) = &GetMarcFromKohaField( "items.itemnumber", '' );
59
my ( $itemfield, $itemnumbersubfield ) = &GetMarcFromKohaField( "items.itemnumber", '' );
61
60
Lines 98-113 while ( my ( $biblionumber, $biblioitemnumber, $frameworkcode ) = $sth->fetchrow Link Here
98
97
99
my $sthCataloguingLog = $dbh->prepare("UPDATE systempreferences SET value=? WHERE variable='CataloguingLog'");
98
my $sthCataloguingLog = $dbh->prepare("UPDATE systempreferences SET value=? WHERE variable='CataloguingLog'");
100
$sthCataloguingLog->execute($CataloguingLog);
99
$sthCataloguingLog->execute($CataloguingLog);
101
my $sthdontmerge = $dbh->prepare("UPDATE systempreferences SET value=? WHERE variable='dontmerge'");
100
my $sthmergelimit = $dbh->prepare("UPDATE systempreferences SET value=? WHERE variable='AuthorityMergeLimit'");
102
$sthdontmerge->execute($dontmerge);
101
$sthmergelimit->execute($mergelimit);
103
$dbh->commit() unless $test_parameter;
102
$dbh->commit() unless $test_parameter;
104
my $timeneeded = time() - $starttime;
103
my $timeneeded = time() - $starttime;
105
print "$count MARC record done in $timeneeded seconds\n";
104
print "$count MARC record done in $timeneeded seconds\n";
106
if ( scalar(@errors) > 0 ) {
105
if ( scalar(@errors) > 0 ) {
107
    print "Some biblionumber could not be processed though: ", join( " ", @errors );
106
    print "Some biblionumber could not be processed though: ", join( " ", @errors );
108
}
107
}
109
110
sub defnonull {
111
    my $var = shift;
112
    return defined $var && $var ne q{};
113
}
(-)a/t/db_dependent/UsageStats.t (-2 / +2 lines)
Lines 348-354 sub mocking_systempreferences_to_a_set_value { Link Here
348
        AuthDisplayHierarchy
348
        AuthDisplayHierarchy
349
        AutoCreateAuthorities
349
        AutoCreateAuthorities
350
        BiblioAddsAuthorities
350
        BiblioAddsAuthorities
351
        dontmerge
351
        AuthorityMergeLimit
352
        AuthorityMergeMode
352
        UseAuthoritiesForTracings
353
        UseAuthoritiesForTracings
353
        CatalogModuleRelink
354
        CatalogModuleRelink
354
        hide_marc
355
        hide_marc
355
- 

Return to bug 9988