From 33823329823c1a76cca6af206ba35f0978c75afa Mon Sep 17 00:00:00 2001 From: Mike Taylor Date: Thu, 16 Nov 2006 17:30:25 +0000 Subject: [PATCH] Eliminate temporary variable. --- web/htdocs/details/edit.mc | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/web/htdocs/details/edit.mc b/web/htdocs/details/edit.mc index 917c9f3..c1c1abb 100644 --- a/web/htdocs/details/edit.mc +++ b/web/htdocs/details/edit.mc @@ -1,4 +1,4 @@ -%# $Id: edit.mc,v 1.17 2006-11-16 17:27:15 mike Exp $ +%# $Id: edit.mc,v 1.18 2006-11-16 17:30:25 mike Exp $ <%args> $id => undef @@ -11,11 +11,10 @@ if (defined $id && $id ne "") { # Existing record my $query = 'rec.id="' . cql_quote($id) . '"'; my $rs = $conn->search(new ZOOM::Query::CQL($query)); - my $n = $rs->size(); - if ($n == 0) { - $id = undef; - } else { + if ($rs->size() > 0) { $rec = $rs->record(0); + } else { + $id = undef; } } else { -- 1.7.10.4