koha-cvs
[Top][All Lists]
Advanced

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

[Koha-cvs] koha/C4 AuthoritiesMarc.pm [dev_week]


From: Joshua Ferraro
Subject: [Koha-cvs] koha/C4 AuthoritiesMarc.pm [dev_week]
Date: Thu, 27 Jul 2006 16:34:57 +0000

CVSROOT:        /sources/koha
Module name:    koha
Branch:         dev_week
Changes by:     Joshua Ferraro <kados>  06/07/27 16:34:57

Modified files:
        C4             : AuthoritiesMarc.pm 

Log message:
        syncing with rel_2_2 .. .untested.

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/koha/C4/AuthoritiesMarc.pm?cvsroot=koha&only_with_tag=dev_week&r1=1.9.2.17.2.1&r2=1.9.2.17.2.2

Patches:
Index: AuthoritiesMarc.pm
===================================================================
RCS file: /sources/koha/koha/C4/AuthoritiesMarc.pm,v
retrieving revision 1.9.2.17.2.1
retrieving revision 1.9.2.17.2.2
diff -u -b -r1.9.2.17.2.1 -r1.9.2.17.2.2
--- AuthoritiesMarc.pm  28 May 2006 18:49:12 -0000      1.9.2.17.2.1
+++ AuthoritiesMarc.pm  27 Jul 2006 16:34:56 -0000      1.9.2.17.2.2
@@ -186,15 +186,20 @@
        }
        }#
 
-my $summary=getsummary($dbh,$authrecord,$authid,$authtypecode);
-$summary="<a href='detail.pl?authid=$authid'>".$summary.".</a>";
-if ($linkid && $linksummary ne " ".$separator){
-$summary="<b>".$summary."</b>".$linksummary;
-}
+       my $summary=getsummary($dbh,$authrecord,$authid,$authtypecode);
+       $summary="<a href='detail.pl?authid=$authid'>".$summary.".</a>";
+       if ($linkid && $linksummary ne " ".$separator){
+               $summary="<b>".$summary."</b>".$linksummary;
+       }
+       my $query_auth_tag = "SELECT auth_tag_to_report FROM auth_types WHERE 
authtypecode=?";
+       my $sth = $dbh->prepare($query_auth_tag);
+       $sth->execute($authtypecode);
+       my $auth_tag_to_report = $sth->fetchrow;
        my %newline;
        $newline{summary} = $summary;
        $newline{authid} = $authid;
        $newline{linkid} = $linkid;
+       $newline{reported_tag} = $reported_tag;
 #      $newline{used} =0;
 #      $newline{biblio_fields} = $tags_using_authtype;
        $newline{even} = $counter % 2;
@@ -692,15 +697,22 @@
  my $authref = getauthtype($authtypecode);
                my $summary = $authref->{summary};
                my @fields = $record->fields();
-#              chop $tags_using_authtype;
+#              chop $tags_using_authtype; # FIXME: why commented out?
+               my $reported_tag;
+
                # if the library has a summary defined, use it. Otherwise, 
build a standard one
                if ($summary) {
                        my @fields = $record->fields();
+                       $reported_tag = '$9'.$result[$counter];
                        foreach my $field (@fields) {
                                my $tag = $field->tag();
                                my $tagvalue = $field->as_string();
                                $summary =~ 
s/\[(.?.?.?.?)$tag\*(.*?)]/$1$tagvalue$2\[$1$tag$2]/g;
                                if ($tag<10) {
+                               if ($tag eq '001') {
+                                       $reported_tag.='$3'.$field->data();
+                               }
+
                                } else {
                                        my @subf = $field->subfields;
                                        for my $i (0..$#subf) {
@@ -708,6 +720,9 @@
                                                my $subfieldvalue = 
$subf[$i][1];
                                                my $tagsubf = 
$tag.$subfieldcode;
                                                $summary =~ 
s/\[(.?.?.?.?)$tagsubf(.*?)]/$1$subfieldvalue$2\[$1$tagsubf$2]/g;
+                                               if ($tag eq 
$auth_tag_to_report) {
+                                                       
$reported_tag.='$'.$subfieldcode.$subfieldvalue;
+                                               }
                                        }
                                }
                        }
@@ -880,8 +895,11 @@
 
 =cut
 
-# $Id: AuthoritiesMarc.pm,v 1.9.2.17.2.1 2006/05/28 18:49:12 tgarip1957 Exp $
+# $Id: AuthoritiesMarc.pm,v 1.9.2.17.2.2 2006/07/27 16:34:56 kados Exp $
 # $Log: AuthoritiesMarc.pm,v $
+# Revision 1.9.2.17.2.2  2006/07/27 16:34:56  kados
+# syncing with rel_2_2 .. .untested.
+#
 # Revision 1.9.2.17.2.1  2006/05/28 18:49:12  tgarip1957
 # This is an unusual commit. The main purpose is a working model of Zebra on a 
modified rel2_2.
 # Any questions regarding these commits should be asked to Joshua Ferraro 
unless you are Joshua whom I'll report to




reply via email to

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