From: Mike Taylor Date: Thu, 22 Feb 2007 11:49:46 +0000 (+0000) Subject: Show "[UNTITLED]" for records with no title: this is important, since X-Git-Tag: CPAN-v1.02~54^2~554 X-Git-Url: http://git.indexdata.com/?p=irspy-moved-to-github.git;a=commitdiff_plain;h=4106328950233f27c6e8fdf0e94e8fab8bc7761e Show "[UNTITLED]" for records with no title: this is important, since the title is a link to the main record display. --- 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, "") %>