koha-cvs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Koha-cvs] koha C4/AuthoritiesMarc.pm misc/migration_tools... [rel_3_0]


From: Henri-Damien LAURENT
Subject: [Koha-cvs] koha C4/AuthoritiesMarc.pm misc/migration_tools... [rel_3_0]
Date: Wed, 06 Dec 2006 14:20:00 +0000

CVSROOT:        /cvsroot/koha
Module name:    koha
Branch:         rel_3_0
Changes by:     Henri-Damien LAURENT <hdl>      06/12/06 14:20:00

Modified files:
        C4             : AuthoritiesMarc.pm 
        misc/migration_tools: rebuild_zebra.pl 
        misc/zebra     : record_biblios_unimarc.abs 

Log message:
        ABugFixing : Authority count  Management.

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/koha/C4/AuthoritiesMarc.pm?cvsroot=koha&only_with_tag=rel_3_0&r1=1.28.2.4&r2=1.28.2.5
http://cvs.savannah.gnu.org/viewcvs/koha/misc/migration_tools/rebuild_zebra.pl?cvsroot=koha&only_with_tag=rel_3_0&r1=1.4.2.8&r2=1.4.2.9
http://cvs.savannah.gnu.org/viewcvs/koha/misc/zebra/record_biblios_unimarc.abs?cvsroot=koha&only_with_tag=rel_3_0&r1=1.1.2.2&r2=1.1.2.3

Patches:
Index: C4/AuthoritiesMarc.pm
===================================================================
RCS file: /cvsroot/koha/koha/C4/AuthoritiesMarc.pm,v
retrieving revision 1.28.2.4
retrieving revision 1.28.2.5
diff -u -b -r1.28.2.4 -r1.28.2.5
--- C4/AuthoritiesMarc.pm       17 Nov 2006 13:18:58 -0000      1.28.2.4
+++ C4/AuthoritiesMarc.pm       6 Dec 2006 14:19:59 -0000       1.28.2.5
@@ -309,7 +309,7 @@
 ### try ZOOM search here
 my $oConnection=C4::Context->Zconn("biblioserver");
 my $query;
-$query= "address@hidden GILS 1=2057 ".$authid;
+$query= "address@hidden 1=Koha-Auth-Number ".$authid;
 
 my $oResult = $oConnection->search_pqf($query);
 
@@ -893,8 +893,11 @@
 
 =cut
 
-# $Id: AuthoritiesMarc.pm,v 1.28.2.4 2006/11/17 13:18:58 tipaul Exp $
+# $Id: AuthoritiesMarc.pm,v 1.28.2.5 2006/12/06 14:19:59 hdl Exp $
 # $Log: AuthoritiesMarc.pm,v $
+# Revision 1.28.2.5  2006/12/06 14:19:59  hdl
+# ABugFixing : Authority count  Management.
+#
 # Revision 1.28.2.4  2006/11/17 13:18:58  tipaul
 # code cleaning : removing use of "bib", and replacing with "biblionumber"
 #

Index: misc/migration_tools/rebuild_zebra.pl
===================================================================
RCS file: /cvsroot/koha/koha/misc/migration_tools/rebuild_zebra.pl,v
retrieving revision 1.4.2.8
retrieving revision 1.4.2.9
diff -u -b -r1.4.2.8 -r1.4.2.9
--- misc/migration_tools/rebuild_zebra.pl       6 Dec 2006 10:04:36 -0000       
1.4.2.8
+++ misc/migration_tools/rebuild_zebra.pl       6 Dec 2006 14:19:59 -0000       
1.4.2.9
@@ -199,7 +199,7 @@
     $created_dir_or_file++;
 }
 
-unless (-f C4::Context->zebraconfig('authorityserver')->{ccl2rpn}) {
+unless (-f C4::Context->zebraoptions('authorityserver')->{ccl2rpn}) {
     system("cp -f $kohadir/misc/zebra/ccl.properties 
".C4::Context->zebraconfig('authorityserver')->{ccl2rpn});
     print "Info: copied ccl.properties\n";
     $created_dir_or_file++;
@@ -214,7 +214,7 @@
 # AUTHORITIES : copying mandatory files
 #
 unless (-f C4::Context->zebraconfig('authorityserver')->{config}) {
-open ZD,"> ".C4::Context->zebraconfig('authorityserver')->{config};
+open ZD,">:utf8 ".C4::Context->zebraconfig('authorityserver')->{config};
 print ZD "
 # generated by KOHA/misc/migration_tools/rebuild_zebra.pl 
 
profilePath:\${srcdir:-.}:$authorityserverdir/tab/:$tabdir/tab/:\${srcdir:-.}/tab/
@@ -298,9 +298,9 @@
 print "====================\n";
 print "REINDEXING zebra\n";
 print "====================\n";
-system("zebraidx -g iso2709 -c $authorityserverdir/etc/zebra-authorities.cfg 
-d authorities init") if ($reset);
-system("zebraidx -g iso2709 -c $authorityserverdir/etc/zebra-authorities.cfg 
-d authorities update $directory/authorities");
-system("zebraidx -g iso2709 -c $authorityserverdir/etc/zebra-authorities.cfg 
-d authorities commit");
+system("zebraidx -g iso2709 -c 
".C4::Context->zebraconfig('biblioserver')->{config}." -d authorities init") if 
($reset);
+system("zebraidx -g iso2709 -c 
".C4::Context->zebraconfig('biblioserver')->{config}." -d authorities update 
$directory/authorities");
+system("zebraidx -g iso2709 -c 
".C4::Context->zebraconfig('biblioserver')->{config}." -d authorities commit");
 
 
#################################################################################################################
 #                        BIBLIOS 
@@ -383,12 +383,12 @@
     print "Info: copied default.idx\n";
     $created_dir_or_file++;
 }
-unless (-f C4::Context->zebraconfig('authorityserver')->{ccl2rpn}) {
+unless (-f C4::Context->zebraoptions('biblioserver')->{ccl2rpn}) {
     system("cp -f $kohadir/misc/zebra/ccl.properties 
".C4::Context->zebraconfig('authorityserver')->{ccl2rpn});
     print "Info: copied ccl.properties\n";
     $created_dir_or_file++;
 }
-unless (-f C4::Context->zebraconfig('authorityserver')->{cql2rpn}) {
+unless (-f C4::Context->zebraconfig('biblioserver')->{cql2rpn}) {
     system("cp -f $kohadir/misc/zebra/pqf.properties 
".C4::Context->zebraconfig('authorityserver')->{cql2rpn});
     print "Info: copied pqf.properties\n";
     $created_dir_or_file++;
@@ -397,8 +397,8 @@
 #
 # BIBLIOS : copying mandatory files
 #
-unless (-f C4::Context->zebraconfig('authorityserver')->{config}) {
-open ZD,">".C4::Context->zebraconfig('authorityserver')->{config};
+unless (-f C4::Context->zebraconfig('biblioserver')->{config}) {
+open ZD,">:utf8".C4::Context->zebraconfig('biblioserver')->{config};
 print ZD "
 # generated by KOHA/misc/migrtion_tools/rebuild_zebra.pl 
 profilePath:\${srcdir:-.}:$biblioserverdir/tab/:$tabdir/tab/:\${srcdir:-.}/tab/
@@ -462,7 +462,7 @@
     print "====================\n";
     mkdir "$directory" unless (-d $directory);
     mkdir "$directory/biblios" unless (-d "$directory/biblios");
-    open(OUT,">:utf8","$directory/biblios/export") or die $!;
+    open(OUT,">:utf8 ","$directory/biblios/export") or die $!;
     my $dbh=C4::Context->dbh;
     my $sth;
     $sth=$dbh->prepare("select biblionumber from biblioitems order by 
biblionumber $limit");
@@ -470,6 +470,8 @@
     my $i=0;
     while (my ($biblionumber) = $sth->fetchrow) {
         my $record = GetMarcBiblio($biblionumber);
+#         warn $record->as_formatted;
+#         print $record;
         # check that biblionumber & biblioitemnumber are stored in the MARC 
record, otherwise, add them & update the biblioitems.marcxml data.
         my $record_correct=1;
         unless 
($biblionumbertagfield<10?($record->field($biblionumbertagfield)):($record->subfield($biblionumbertagfield,$biblionumbertagsubfield)))
 {
@@ -536,9 +538,9 @@
 print "====================\n";
 print "REINDEXING zebra\n";
 print "====================\n";
-system("zebraidx -g iso2709 -c $biblioserverdir/etc/zebra-biblios.cfg -d 
biblios init") if ($reset);
-system("zebraidx -g iso2709 -c $biblioserverdir/etc/zebra-biblios.cfg -d 
biblios update $directory/biblios");
-system("zebraidx -g iso2709 -c $biblioserverdir/etc/zebra-biblios.cfg -d 
biblios commit");
+system("zebraidx -g iso2709 -c 
".C4::Context->zebraconfig('biblioserver')->{config}." -d biblios init") if 
($reset);
+system("zebraidx -g iso2709 -c 
".C4::Context->zebraconfig('biblioserver')->{config}." -d biblios update 
$directory/biblios");
+system("zebraidx -g iso2709 -c 
".C4::Context->zebraconfig('biblioserver')->{config}." -d biblios commit");
 
 print "====================\n";
 print "CLEANING\n";

Index: misc/zebra/record_biblios_unimarc.abs
===================================================================
RCS file: /cvsroot/koha/koha/misc/zebra/Attic/record_biblios_unimarc.abs,v
retrieving revision 1.1.2.2
retrieving revision 1.1.2.3
diff -u -b -r1.1.2.2 -r1.1.2.3
--- misc/zebra/record_biblios_unimarc.abs       1 Dec 2006 13:44:34 -0000       
1.1.2.2
+++ misc/zebra/record_biblios_unimarc.abs       6 Dec 2006 14:20:00 -0000       
1.1.2.3
@@ -1,4 +1,4 @@
-# $Id: record_biblios_unimarc.abs,v 1.1.2.2 2006/12/01 13:44:34 tipaul Exp $
+# $Id: record_biblios_unimarc.abs,v 1.1.2.3 2006/12/06 14:20:00 hdl Exp $
 
 # indexing rules. It
 # results in a server which provides a passable Bath level 0 and 1 service
@@ -53,10 +53,17 @@
 # other authors
 melm 200$g             author,author:p
 # physical author
+melm 700$9 Koha-Auth-Number,Koha-Auth-Number:n
+melm 701$9 Koha-Auth-Number,Koha-Auth-Number:n
+melm 702$9 Koha-Auth-Number,Koha-Auth-Number:n
 melm 700               author,author:p
 melm 701               author,author:p
 melm 702               author,author:p
+
 # collective author
+melm 710$9 Koha-Auth-Number,Koha-Auth-Number:n
+melm 711$9 Koha-Auth-Number,Koha-Auth-Number:n
+melm 712$9 Koha-Auth-Number,Koha-Auth-Number:n
 melm 710               author,author:p
 melm 711               author,author:p
 melm 712               author,author:p
@@ -143,14 +150,14 @@
 melm 606               subject-heading,subject-heading:p
 melm 610               subject-heading
 
-melm 600$9      Koha-Auth-Number:n
-melm 601$9      Koha-Auth-Number:n
-melm 602$9      Koha-Auth-Number:n
-melm 603$9      Koha-Auth-Number:n
-melm 604$9      Koha-Auth-Number:n
-melm 605$9      Koha-Auth-Number:n
-melm 606$9      Koha-Auth-Number:n
-melm 610$9      Koha-Auth-Number:n
+melm 600$9      Koha-Auth-Number,Koha-Auth-Number:n
+melm 601$9      Koha-Auth-Number,Koha-Auth-Number:n
+melm 602$9      Koha-Auth-Number,Koha-Auth-Number:n
+melm 603$9      Koha-Auth-Number,Koha-Auth-Number:n
+melm 604$9      Koha-Auth-Number,Koha-Auth-Number:n
+melm 605$9      Koha-Auth-Number,Koha-Auth-Number:n
+melm 606$9      Koha-Auth-Number,Koha-Auth-Number:n
+melm 610$9      Koha-Auth-Number,Koha-Auth-Number:n
 
 #melm 650$9            Controlled-Subject-Index        
 




reply via email to

[Prev in Thread] Current Thread [Next in Thread]