From 34fd524e6436cd1bfa7e9b8493227eadbd68cb28 Mon Sep 17 00:00:00 2001 From: Mike Taylor Date: Thu, 22 Feb 2007 11:49:46 +0000 Subject: [PATCH] Show "[UNTITLED]" for records with no title: this is important, since the title is a link to the main record display. --- web/htdocs/details/found.mc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/web/htdocs/details/found.mc b/web/htdocs/details/found.mc index dab6199..d4b6d66 100644 --- a/web/htdocs/details/found.mc +++ b/web/htdocs/details/found.mc @@ -1,4 +1,4 @@ -%# $Id: found.mc,v 1.26 2007-02-20 19:20:23 mike Exp $ +%# $Id: found.mc,v 1.27 2007-02-22 11:49:46 mike Exp $ <%once> sub print_navlink { my($params, $cond, $caption, $skip) = @_; @@ -126,7 +126,7 @@ print_navlink(\%params, $last < $n, "Next", $skip+$count); % foreach my $i ($first .. $last) { <%perl> my $xc = irspy_xpath_context($rs->record($i-1)); -my $title = $xc->find("e:databaseInfo/e:title"); +my $title = $xc->find("e:databaseInfo/e:title") || "[UNTITLED]"; my $reliability = calc_reliability($xc); my $host = $xc->find("e:serverInfo/e:host"); my $port = $xc->find("e:serverInfo/e:port"); @@ -139,7 +139,7 @@ push @ids, $id; <% $i %> <% xml_encode($title, "[untitled]") %> + %>"><% xml_encode($title) %> <% xml_encode($reliability, "", { nbsp => 1 }) %> <% xml_encode($host, "") %> <% xml_encode($port, "") %> -- 1.7.10.4