X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=web%2Fhtdocs%2Fdetails%2Ffound.mc;h=84735fc6693757a40ab5c7f7397b6bb70542256e;hb=08f7276dbdd4b6d3f02cfa3f4b4d06f0af331055;hp=dab6199e458926ab89c9191776ba088811b82b71;hpb=d5a78c57cbd06e19c3186999a05172a8aa9eb6d7;p=irspy-moved-to-github.git diff --git a/web/htdocs/details/found.mc b/web/htdocs/details/found.mc index dab6199..84735fc 100644 --- a/web/htdocs/details/found.mc +++ b/web/htdocs/details/found.mc @@ -1,4 +1,3 @@ -%# $Id: found.mc,v 1.26 2007-02-20 19:20:23 mike Exp $ <%once> sub print_navlink { my($params, $cond, $caption, $skip) = @_; @@ -19,26 +18,11 @@ sub navlink { return $url; } -# Identical to the same-named function in full.mc -# So maybe this should go into IRSpy::Utils.pm? -# -sub calc_reliability { - my($xc) = @_; - - my @allpings = $xc->findnodes("i:status/i:probe"); - my $nall = @allpings; - return "[untested]" if $nall == 0; - my @okpings = $xc->findnodes('i:status/i:probe[@ok = "1"]'); - my $nok = @okpings; - return "$nok/$nall = " . int(100*$nok/$nall) . "%"; -} - - # Just make this once; forge the connection on first use our $conn = undef; %once> <%perl> -my %params = map { ( $_, $r->param($_)) } grep { $r->param($_) } $r->param(); +my %params = map { ( $_, utf8param($r, $_)) } grep { &utf8param($r, $_) } &utf8param($r); my $query; if ($params{_query}) { $query = $params{_query}; @@ -69,8 +53,10 @@ if ($sort) { my $tried_to_open = 0; if (!defined $conn) { OPEN: - $conn = new ZOOM::Connection("localhost:8018/IR-Explain---1"); + my $db = ZOOM::IRSpy::connect_to_registry(); + $conn = new ZOOM::Connection($db); $conn->option(elementSetName => "zeerex"); + $conn->option(count => 20); } my $rs; @@ -115,7 +101,8 @@ print_navlink(\%params, $last < $n, "Next", $skip+$count);