3519 : mergeauthority and authority edition were not synched
mergeauthority and ModAuthority were working on two separate directories. So that no authority would ever be merged via cronjob or commandline script when MergeAuthoritiesOnUpdate is disable Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
This commit is contained in:
parent
d5da1cace0
commit
731b82f764
1 changed files with 3 additions and 3 deletions
|
@ -76,9 +76,9 @@ print "Merging\n" unless $noconfirm;
|
||||||
if ($batch) {
|
if ($batch) {
|
||||||
my @authlist;
|
my @authlist;
|
||||||
my $cgidir = C4::Context->intranetdir ."/cgi-bin";
|
my $cgidir = C4::Context->intranetdir ."/cgi-bin";
|
||||||
unless (opendir(DIR, "$cgidir/localfile/modified_authorities")) {
|
unless (opendir(DIR, "$cgidir/tmp/modified_authorities")) {
|
||||||
$cgidir = C4::Context->intranetdir;
|
$cgidir = C4::Context->intranetdir;
|
||||||
opendir(DIR, "$cgidir/localfile/modified_authorities") || die "can't opendir $cgidir/localfile/modified_authorities: $!";
|
opendir(DIR, "$cgidir/tmp/modified_authorities") || die "can't opendir $cgidir/tmp/modified_authorities: $!";
|
||||||
}
|
}
|
||||||
while (my $authid = readdir(DIR)) {
|
while (my $authid = readdir(DIR)) {
|
||||||
if ($authid =~ /\.authid$/) {
|
if ($authid =~ /\.authid$/) {
|
||||||
|
@ -87,7 +87,7 @@ if ($batch) {
|
||||||
my $MARCauth = GetAuthority($authid) ;
|
my $MARCauth = GetAuthority($authid) ;
|
||||||
next unless ($MARCauth);
|
next unless ($MARCauth);
|
||||||
merge($authid,$MARCauth,$authid,$MARCauth) if ($MARCauth);
|
merge($authid,$MARCauth,$authid,$MARCauth) if ($MARCauth);
|
||||||
unlink $cgidir.'/localfile/modified_authorities/'.$authid.'.authid';
|
unlink $cgidir.'/tmp/modified_authorities/'.$authid.'.authid';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
closedir DIR;
|
closedir DIR;
|
||||||
|
|
Loading…
Reference in a new issue