koha-cvs
[Top][All Lists]
Advanced

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

[Koha-cvs] CVS: koha/C4 AuthoritiesMarc.pm,1.9.2.1,1.9.2.2


From: Paul POULAIN
Subject: [Koha-cvs] CVS: koha/C4 AuthoritiesMarc.pm,1.9.2.1,1.9.2.2
Date: Mon, 28 Feb 2005 06:03:16 -0800

Update of /cvsroot/koha/koha/C4
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16041/C4

Modified Files:
      Tag: rel_2_2
        AuthoritiesMarc.pm 
Log Message:
* adding search on "main entry" (ie $a subfield) on a given authority (the 
"search everywhere" field is still here).
* adding a select box to requet "contain" or "begin with" search.
* fixing some bug in authority search (related to "main entry" search)

Index: AuthoritiesMarc.pm
===================================================================
RCS file: /cvsroot/koha/koha/C4/AuthoritiesMarc.pm,v
retrieving revision 1.9.2.1
retrieving revision 1.9.2.2
diff -C2 -r1.9.2.1 -r1.9.2.2
*** AuthoritiesMarc.pm  24 Feb 2005 13:12:13 -0000      1.9.2.1
--- AuthoritiesMarc.pm  28 Feb 2005 14:03:13 -0000      1.9.2.2
***************
*** 62,66 ****
--- 62,83 ----
        #               (m1.subfieldvalue like "Des%" and m2.subfieldvalue like 
"27%")
  
+       # the marclist may contain "mainentry". In this case, search the 
tag_to_report, that depends on
+       # the authtypecode. Then, search on $a of this tag_to_report
+       for (my $i=0;$i<$#{$tags};$i++) {
+               if (@$tags[$i] eq "mainentry") {
+                       my $sth = $dbh->prepare("select auth_tag_to_report from 
auth_types where authtypecode=?");
+                       $sth->execute($authtypecode);
+                       my ($tag_to_report) = $sth->fetchrow;
+                       @$tags[$i] = $tag_to_report."a";
+               }
+       }
+ 
        # "Normal" statements
+       # quote marc fields/subfields
+       for (my $i=0;$i<$#{$tags};$i++) {
+               if (@$tags[$i]) {
+                       @$tags[$i] = $dbh->quote(@$tags[$i]);
+               }
+       }
        my @normal_tags = ();
        my @normal_and_or = ();
***************
*** 842,845 ****
--- 859,867 ----
  # $Id$
  # $Log$
+ # Revision 1.9.2.2  2005/02/28 14:03:13  tipaul
+ # * adding search on "main entry" (ie $a subfield) on a given authority (the 
"search everywhere" field is still here).
+ # * adding a select box to requet "contain" or "begin with" search.
+ # * fixing some bug in authority search (related to "main entry" search)
+ #
  # Revision 1.9.2.1  2005/02/24 13:12:13  tipaul
  # saving authority modif in a text file. This will be used soon with another 
script (in crontab). The script in crontab will retrieve every authorityid in 
the directory localfile/authorities and modify every biblio using this 
authority. Those modifs may be long. So they can't be done through http, 
because we may encounter a webserver timeout, and kill the process before end 
of the job.




reply via email to

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