[Koha-cvs] koha cataloguing/z3950_search.pl koha-tmpl/intr... [rel_3_0]

Henri-Damien LAURENT laurenthdl at alinto.com
Mon Feb 19 10:46:19 CET 2007


CVSROOT:	/cvsroot/koha
Module name:	koha
Branch:		rel_3_0
Changes by:	Henri-Damien LAURENT <hdl>	07/02/19 09:46:19

Modified files:
	cataloguing    : z3950_search.pl 
	koha-tmpl/intranet-tmpl/prog/en/cataloguing: z3950_search.tmpl 

Log message:
	Improving server data fetching.
	biblio retrieving count is limited (hard-coded to 5.)
	broad title or author search can be very long if there is no limit.
	But is 5 enough ?

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/koha/cataloguing/z3950_search.pl?cvsroot=koha&only_with_tag=rel_3_0&r1=1.1.2.1&r2=1.1.2.2
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/prog/en/cataloguing/z3950_search.tmpl?cvsroot=koha&only_with_tag=rel_3_0&r1=1.1.2.1&r2=1.1.2.2

Patches:
Index: cataloguing/z3950_search.pl
===================================================================
RCS file: /cvsroot/koha/koha/cataloguing/Attic/z3950_search.pl,v
retrieving revision 1.1.2.1
retrieving revision 1.1.2.2
diff -u -b -r1.1.2.1 -r1.1.2.2
--- cataloguing/z3950_search.pl	11 Jan 2007 14:16:28 -0000	1.1.2.1
+++ cataloguing/z3950_search.pl	19 Feb 2007 09:46:18 -0000	1.1.2.2
@@ -62,7 +62,7 @@
 my @serverhost;
 my @breeding_loop = ();
 
-my $DEBUG = 0; # if set to 1, many debug message are send on syslog.
+my $DEBUG = 1; # if set to 1, many debug message are send on syslog.
 
 unless ($random) { # this var is not useful anymore just kept to keep rel2_2 compatibility
     $random =rand(1000000000);
@@ -87,15 +87,9 @@
 if ($op ne "do_search"){
     my $sth=$dbh->prepare("select id,host,checked from z3950servers  order by host");
     $sth->execute();
-    while ($server=$sth->fetchrow_hashref) {
-        my %temploop;
-        $temploop{server}=$server->{host};
-        $temploop{id}=$server->{id};
-        $temploop{checked}=$server->{checked};
-        push (@serverloop, \%temploop);
-    }
+    my $serverloop=$sth->fetchall_arrayref({});
     $template->param(isbn=>$isbn, issn=>$issn,title=>$title,author=>$author,
-                        serverloop => \@serverloop,
+                        serverloop => $serverloop,
                         opsearch => "search",
                         biblionumber => $biblionumber,
                         );

Index: koha-tmpl/intranet-tmpl/prog/en/cataloguing/z3950_search.tmpl
===================================================================
RCS file: /cvsroot/koha/koha/koha-tmpl/intranet-tmpl/prog/en/cataloguing/Attic/z3950_search.tmpl,v
retrieving revision 1.1.2.1
retrieving revision 1.1.2.2
diff -u -b -r1.1.2.1 -r1.1.2.2
--- koha-tmpl/intranet-tmpl/prog/en/cataloguing/z3950_search.tmpl	11 Jan 2007 14:16:28 -0000	1.1.2.1
+++ koha-tmpl/intranet-tmpl/prog/en/cataloguing/z3950_search.tmpl	19 Feb 2007 09:46:19 -0000	1.1.2.2
@@ -4,7 +4,7 @@
 <head>
 <title>Z39.50 Search Results</title>
     <!-- TMPL_IF NAME="TemplateEncoding" --><meta http-equiv="Content-Type" content="text/html; charset=<!-- TMPL_VAR NAME="TemplateEncoding" -->"><!-- TMPL_ELSE --><meta http-equiv="Content-Type" content="text/html; charset=utf-8"><!-- /TMPL_IF -->
-<link rel="shortcut icon" href="/intranet-tmpl/npl/en/includes/favicon.ico" type="image/x-icon" />
+<link rel="shortcut icon" href="/intranet-tmpl/prog/en/includes/favicon.ico" type="image/x-icon" />
 <style type="text/css"> 
     <!-- TMPL_IF NAME="intranetstylesheet" -->@import url(<!-- TMPL_VAR NAME='themelang' -->/includes/<!-- TMPL_VAR NAME="intranetstylesheet" -->);<!-- TMPL_ELSE -->@import url(<!-- TMPL_VAR NAME='themelang' -->/includes/intranet.css);<!-- /TMPL_IF -->
     <!-- TMPL_IF NAME="intranetcolorstylesheet" -->@import url(<!-- TMPL_VAR NAME='themelang' -->/includes/<!-- TMPL_VAR NAME="intranetcolorstylesheet" -->);<!-- /TMPL_IF -->
@@ -28,11 +28,12 @@
     
     <!-- TMPL_LOOP name="serverloop" -->
         <p>
+        <label><!-- TMPL_VAR NAME="host" --></label>
             <!-- TMPL_IF name="checked" -->
-                <input type="checkbox" name="id" value=<!-- TMPL_VAR NAME="id" --> checked="1">
+                <input type="checkbox" name="id" value="<!-- TMPL_VAR NAME="id" -->" checked />
             <!-- TMPL_ELSE -->
-                <input type="checkbox" name="id" value=<!-- TMPL_VAR NAME="id" --> checked="1">
-            <!-- /TMPL_IF --><label><!-- TMPL_VAR NAME="server" --></label>
+                <input type="checkbox" name="id" value="<!-- TMPL_VAR NAME="id" -->" />
+            <!-- /TMPL_IF -->
         </p>
     <!-- /TMPL_LOOP -->
     <input type="submit"  class="submit" value="Search internet" onclick="cursor :'wait'"/>





More information about the Koha-cvs mailing list