From 2bb924e28d117e0c64607bc901db56207935d0c8 Mon Sep 17 00:00:00 2001 From: Adrien Saurat Date: Mon, 2 Apr 2012 10:43:58 +0200 Subject: [PATCH] Bug 7866: z39.50 search list ordered by rank In the z39.50 cataloging search page, the servers are now sorted by rank and name. Signed-off-by: Marijana Glavica --- cataloguing/z3950_search.pl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cataloguing/z3950_search.pl b/cataloguing/z3950_search.pl index 10320e2b25..6e6b417f48 100755 --- a/cataloguing/z3950_search.pl +++ b/cataloguing/z3950_search.pl @@ -82,7 +82,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,name,checked from z3950servers order by host"); + my $sth = $dbh->prepare("SELECT id,host,name,checked FROM z3950servers ORDER BY rank, name"); $sth->execute(); my $serverloop = $sth->fetchall_arrayref( {} ); $template->param( @@ -168,7 +168,7 @@ for my $i (1..$nterms-1) { warn "query ".$query if $DEBUG; foreach my $servid (@id) { - my $sth = $dbh->prepare("select * from z3950servers where id=?"); + my $sth = $dbh->prepare("SELECT * FROM z3950servers WHERE id=? ORDER BY rank, name"); $sth->execute($servid); while ( $server = $sth->fetchrow_hashref ) { warn "serverinfo ".join(':',%$server) if $DEBUG; -- 2.39.5