koha-cvs
[Top][All Lists]
Advanced

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

[Koha-cvs] koha koha-tmpl/intranet-tmpl/default/en/value_b... [rel_2_2]


From: paul poulain
Subject: [Koha-cvs] koha koha-tmpl/intranet-tmpl/default/en/value_b... [rel_2_2]
Date: Thu, 05 Jan 2006 15:14:47 +0000

CVSROOT:        /cvsroot/koha
Module name:    koha
Branch:         rel_2_2
Changes by:     paul poulain <address@hidden>   06/01/05 15:14:47

Modified files:
        koha-tmpl/intranet-tmpl/default/en/value_builder: 
                                                          
unimarc_field_210c.tmpl 
        value_builder  : unimarc_field_225a.pl 

Log message:
        * (UNIMARC specific bugfix) when an editor is entered, with no ISBN, 
the collection plugin (225a) can find collections attached to the editor name. 
Note that if there are more than 1 EDITORS authority for a given editor, only 
the 1st will be used to create collection list.

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/koha/koha/koha-tmpl/intranet-tmpl/default/en/value_builder/unimarc_field_210c.tmpl.diff?only_with_tag=rel_2_2&tr1=1.3.2.2&tr2=1.3.2.3&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/koha/koha/value_builder/unimarc_field_225a.pl.diff?only_with_tag=rel_2_2&tr1=1.8.2.4&tr2=1.8.2.5&r1=text&r2=text

Patches:
Index: 
koha/koha-tmpl/intranet-tmpl/default/en/value_builder/unimarc_field_210c.tmpl
diff -u 
koha/koha-tmpl/intranet-tmpl/default/en/value_builder/unimarc_field_210c.tmpl:1.3.2.2
 
koha/koha-tmpl/intranet-tmpl/default/en/value_builder/unimarc_field_210c.tmpl:1.3.2.3
--- 
koha/koha-tmpl/intranet-tmpl/default/en/value_builder/unimarc_field_210c.tmpl:1.3.2.2
       Sat Oct 15 16:45:42 2005
+++ 
koha/koha-tmpl/intranet-tmpl/default/en/value_builder/unimarc_field_210c.tmpl   
    Thu Jan  5 15:14:47 2006
@@ -104,7 +104,7 @@
 
 function report(index,summary)
 {      
-       var regexp= /(\d* - *)(.*)/;
+       var regexp= /(\d* -+ *)(.*)/;
        var result=summary.match(regexp);
        opener.document.f.field_value[index].value=result[2];
        self.close();
Index: koha/value_builder/unimarc_field_225a.pl
diff -u koha/value_builder/unimarc_field_225a.pl:1.8.2.4 
koha/value_builder/unimarc_field_225a.pl:1.8.2.5
--- koha/value_builder/unimarc_field_225a.pl:1.8.2.4    Thu Dec  8 09:35:50 2005
+++ koha/value_builder/unimarc_field_225a.pl    Thu Jan  5 15:14:47 2006
@@ -1,6 +1,6 @@
 #!/usr/bin/perl
 
-# $Id: unimarc_field_225a.pl,v 1.8.2.4 2005/12/08 09:35:50 tipaul Exp $
+# $Id: unimarc_field_225a.pl,v 1.8.2.5 2006/01/05 15:14:47 tipaul Exp $
 
 # Copyright 2000-2002 Katipo Communications
 #
@@ -118,15 +118,28 @@
 # builds collection list : search isbn and editor, in parent, then load 
collections from bibliothesaurus table
        # if there is an isbn, complete search
                my @collections;
-               my $sth = $dbh->prepare("select 
auth_subfield_table.authid,subfieldvalue from auth_subfield_table 
-                                               left join auth_header on 
auth_subfield_table.authid=auth_header.authid 
-                                               where authtypecode='EDITORS' 
and tag='200' and subfieldcode='a' and subfieldvalue=?");
-               my $sth2 = $dbh->prepare("select subfieldvalue from 
auth_subfield_table where tag='200' and subfieldcode='c' and authid=? order by 
subfieldvalue");
-               my @splited = split //, $isbn_found;
-               my $isbn_rebuild='';
-               foreach my $x (@splited) {
-                       $isbn_rebuild.=$x;
-                       $sth->execute($isbn_rebuild);
+               if ($isbn_found) {
+                       my $sth = $dbh->prepare("select 
auth_subfield_table.authid,subfieldvalue from auth_subfield_table 
+                                                       left join auth_header 
on auth_subfield_table.authid=auth_header.authid 
+                                                       where 
authtypecode='EDITORS' and tag='200' and subfieldcode='a' and subfieldvalue=?");
+                       my $sth2 = $dbh->prepare("select subfieldvalue from 
auth_subfield_table where tag='200' and subfieldcode='c' and authid=? order by 
subfieldvalue");
+                       my @splited = split //, $isbn_found;
+                       my $isbn_rebuild='';
+                       foreach my $x (@splited) {
+                               $isbn_rebuild.=$x;
+                               $sth->execute($isbn_rebuild);
+                               my ($authid) = $sth->fetchrow;
+                               $sth2->execute($authid);
+                               while (my ($line)= $sth2->fetchrow) {
+                                       push @collections,$line;
+                               }
+                       }
+               } else {
+                       my $sth = $dbh->prepare("select 
auth_subfield_table.authid,subfieldvalue from auth_subfield_table 
+                                                       left join auth_header 
on auth_subfield_table.authid=auth_header.authid 
+                                                       where 
authtypecode='EDITORS' and tag='200' and subfieldcode='b' and subfieldvalue=?");
+                       my $sth2 = $dbh->prepare("select subfieldvalue from 
auth_subfield_table where tag='200' and subfieldcode='c' and authid=? order by 
subfieldvalue");
+                       $sth->execute($editor_found);
                        my ($authid) = $sth->fetchrow;
                        $sth2->execute($authid);
                        while (my ($line)= $sth2->fetchrow) {




reply via email to

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