koha-cvs
[Top][All Lists]
Advanced

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

[Koha-cvs] CVS: koha/C4 SearchMarc.pm,1.36.2.12,1.36.2.13 Search.pm,1.99


From: Paul POULAIN
Subject: [Koha-cvs] CVS: koha/C4 SearchMarc.pm,1.36.2.12,1.36.2.13 Search.pm,1.99.2.6,1.99.2.7
Date: Tue, 26 Jul 2005 01:38:29 -0700

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

Modified Files:
      Tag: rel_2_2
        SearchMarc.pm Search.pm 
Log Message:
<IMPORTANT NOTES for NPL>

Some cleaning :
- removing dirty hack getMARCurl in SearchMarc.pm & replacing it by some Perl 
in Search.pm : if repeated, urls are stored in biblioitems.url, separated by a 
|. Now, the urls are splitted in an array. WARNING : the template has been 
modified & NPL MUST modify their templates as well, should be really trivial 
(open http://bureau.paulpoulain.com:9010/cgi-bin/koha/opac-detail.pl?bib=1 to 
see the result)
- using getMARCsubjcts and getMARCnotes in css templates as well. WARNING 
(specially for NPL) : the MARC notes & subjects were outside from 
BIBLIO_RESULTS array. As notes & subjects were in this <!-- TMPL_LOOP --> i had 
to add them IN the loop. I think it's better, so I commented (line 73 and 74 of 
opac-detail) 2 lines that are useless for me but useful for you. My opinion is 
that it would be better to modify your template to put notes & subjects in the 
<TMPL_LOOP> (should be trivial) than uncommenting those lines (= create 
duplicate code)
However, my real opinion is that we have no good reason to use <!-- TMPL_LOOP 
name="BIBLIO_RESULTS" --> as we always have only 1 biblio here. But that's 
something we should fix in HEAD, not in 2.2

Index: SearchMarc.pm
===================================================================
RCS file: /cvsroot/koha/koha/C4/SearchMarc.pm,v
retrieving revision 1.36.2.12
retrieving revision 1.36.2.13
diff -C2 -r1.36.2.12 -r1.36.2.13
*** SearchMarc.pm       1 Jul 2005 18:26:10 -0000       1.36.2.12
--- SearchMarc.pm       26 Jul 2005 08:38:25 -0000      1.36.2.13
***************
*** 42,46 ****
  
  @ISA = qw(Exporter);
! @EXPORT = qw(&catalogsearch &findseealso &findsuggestion &getMARCurls 
&getMARCnotes &getMARCsubjects);
  
  =head1 findsuggestion($dbh,$values);
--- 42,46 ----
  
  @ISA = qw(Exporter);
! @EXPORT = qw(&catalogsearch &findseealso &findsuggestion &getMARCnotes 
&getMARCsubjects);
  
  =head1 findsuggestion($dbh,$values);
***************
*** 574,578 ****
  
        $sth->finish;
-       $dbh->disconnect;
  
        my address@hidden;
--- 574,577 ----
***************
*** 611,615 ****
  
        $sth->finish;
-       $dbh->disconnect;
  
        my address@hidden;
--- 610,613 ----
***************
*** 617,638 ****
  }  #end getMARCsubjects
  
- sub getMARCurls {
- # same for MARC21 and UNIMARC with current functionality
- # FIXME: really, this is a temporary hack
-    my ($dbh, $bibid, $marcflavour) = @_;
- my $sth=$dbh->prepare("SELECT subfieldvalue FROM marc_subfield_table WHERE 
bibid=? AND tag = '856' and subfieldcode = 'u'");
- $sth->execute($bibid);
- my @marcurls;
-         while (my $data=$sth->fetchrow_array) {
-               my %line;
-               $line{MARCURL} = $data;
-                 push @marcurls, \%line;
-       }
-       $sth->finish;
-       $dbh->disconnect;
- my address@hidden;
- return $marcurlsarray;
- }  #end getMARCurls
-                               
  END { }       # module clean-up code here (global destructor)
  
--- 615,618 ----

Index: Search.pm
===================================================================
RCS file: /cvsroot/koha/koha/C4/Search.pm,v
retrieving revision 1.99.2.6
retrieving revision 1.99.2.7
diff -C2 -r1.99.2.6 -r1.99.2.7
*** Search.pm   7 Apr 2005 10:08:31 -0000       1.99.2.6
--- Search.pm   26 Jul 2005 08:38:26 -0000      1.99.2.7
***************
*** 1501,1504 ****
--- 1501,1512 ----
        $data  = $sth->fetchrow_hashref;
        $sth->finish;
+       # move url to an array, splitting it on every |
+       my @URLS;
+       foreach (split /\|/,$data->{url}) {
+               my %url;
+               $url{url} = $_;
+               push @URLS,\%url;
+       }
+       $data->{URLS} = address@hidden;
        # handle management of repeated subtitle
        $sth   = $dbh->prepare("Select * from bibliosubtitle where biblionumber 
= ?");




reply via email to

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