[Koha-patches] [PATCH] 3519 : mergeauthority and authority edition were not synched

Henri-Damien LAURENT henridamien.laurent at biblibre.com
Tue Aug 11 14:55:49 CEST 2009


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
---
 misc/migration_tools/merge_authority.pl |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/misc/migration_tools/merge_authority.pl b/misc/migration_tools/merge_authority.pl
index b5e64f6..8bf4e7c 100755
--- a/misc/migration_tools/merge_authority.pl
+++ b/misc/migration_tools/merge_authority.pl
@@ -76,9 +76,9 @@ print "Merging\n" unless $noconfirm;
 if ($batch) {
   my @authlist;
   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;
-    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)) {
     if ($authid =~ /\.authid$/) {
@@ -87,7 +87,7 @@ if ($batch) {
       my $MARCauth = GetAuthority($authid) ;
       next unless ($MARCauth);
       merge($authid,$MARCauth,$authid,$MARCauth) if ($MARCauth);
-      unlink $cgidir.'/localfile/modified_authorities/'.$authid.'.authid';
+      unlink $cgidir.'/tmp/modified_authorities/'.$authid.'.authid';
     }
   }
   closedir DIR;
-- 
1.6.0.4




More information about the Koha-patches mailing list