From 07bd6ea6c324b2707538656eb0526a223826922d Mon Sep 17 00:00:00 2001 From: Mike Taylor Date: Thu, 16 Nov 2006 17:10:30 +0000 Subject: [PATCH] Eliminate temporary variable. --- web/htdocs/details/found.mc | 5 ++--- web/htdocs/details/full.mc | 5 ++--- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/web/htdocs/details/found.mc b/web/htdocs/details/found.mc index 20e808f..7df2dff 100644 --- a/web/htdocs/details/found.mc +++ b/web/htdocs/details/found.mc @@ -1,4 +1,4 @@ -%# $Id: found.mc,v 1.19 2006-11-16 12:17:02 mike Exp $ +%# $Id: found.mc,v 1.20 2006-11-16 17:10:30 mike Exp $ <%once> sub print_navlink { my($params, $cond, $caption, $skip) = @_; @@ -110,8 +110,7 @@ print_navlink(\%params, $last < $n, "Next", $skip+$count); % my @ids; % foreach my $i ($first .. $last) { <%perl> -my $rec = $rs->record($i-1); -my $xc = irspy_xpath_context($rec); +my $xc = irspy_xpath_context($rs->record($i-1)); my $title = $xc->find("e:databaseInfo/e:title"); my $author = $xc->find("e:databaseInfo/e:author"); my $host = $xc->find("e:serverInfo/e:host"); diff --git a/web/htdocs/details/full.mc b/web/htdocs/details/full.mc index 36b7232..13865ed 100644 --- a/web/htdocs/details/full.mc +++ b/web/htdocs/details/full.mc @@ -1,4 +1,4 @@ -%# $Id: full.mc,v 1.16 2006-11-16 11:48:49 mike Exp $ +%# $Id: full.mc,v 1.17 2006-11-16 17:12:30 mike Exp $ <%args> $id @@ -14,8 +14,7 @@ if ($n == 0) { $m->comp("/details/error.mc", title => "Error", message => "No such ID '$id'"); } else { - my $rec = $rs->record(0); - my $xc = irspy_xpath_context($rec); + my $xc = irspy_xpath_context($rs->record(0)); my @fields = ( [ "Last Checked" => "i:status/i:probe[last()]" ], [ Protocol => "e:serverInfo/\@protocol" ], -- 1.7.10.4