Changing z3950 search in cataloguing to use the name rather than the host
authorChris Cormack <crc@liblime.com>
Tue, 8 Jan 2008 20:31:54 +0000 (14:31 -0600)
committerJoshua Ferraro <jmf@liblime.com>
Tue, 8 Jan 2008 22:13:00 +0000 (16:13 -0600)
when listing z3950 servers to search

Signed-off-by: Joshua Ferraro <jmf@liblime.com>
cataloguing/z3950_search.pl
koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/z3950_search.tmpl

index 063cf4a..c28bed3 100755 (executable)
@@ -62,7 +62,7 @@ my @serverloop = ();
 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
@@ -83,7 +83,7 @@ my ( $template, $loggedinuser, $cookie ) = get_template_and_user(
 $template->param( frameworkcode => $frameworkcode, );
 
 if ( $op ne "do_search" ) {
-    my $sth = $dbh->prepare("select id,host,checked from z3950servers  order by host");
+    my $sth = $dbh->prepare("select id,host,name,checked from z3950servers  order by host");
     $sth->execute();
     my $serverloop = $sth->fetchall_arrayref( {} );
     $template->param(
@@ -160,7 +160,7 @@ else {
           || $DEBUG
           && warn( "somthing went wrong: " . $oConnection[$s]->errmsg() );
 
-        #$oResult[$z] = $oConnection[$z]->search_pqf($query);
+        # $oResult[$z] = $oConnection[$z]->search_pqf($query);
     }
 
   AGAIN:
index 5d13030..d8b2dfa 100644 (file)
@@ -42,7 +42,7 @@
             <!-- TMPL_ELSE -->
                 <input type="checkbox" name="id" id="<!-- TMPL_VAR NAME="id" -->id" value="<!-- TMPL_VAR NAME="id" -->" />
             <!-- /TMPL_IF -->
-        <label for="<!-- TMPL_VAR NAME="id" -->id"><!-- TMPL_VAR NAME="host" --></label>
+        <label for="<!-- TMPL_VAR NAME="id" -->id"><!-- TMPL_VAR NAME="name" --></label>
         </li>
     <!-- /TMPL_LOOP --></ol></fieldset>
     <fieldset class="action"><input type="submit" class="submit" value="Submit" onclick="cursor :'wait'" /></fieldset>