From: Mike Taylor Date: Thu, 16 Nov 2006 17:30:25 +0000 (+0000) Subject: Eliminate temporary variable. X-Git-Tag: CPAN-v1.02~54^2~717 X-Git-Url: http://jsfdemo.indexdata.com/cgi-bin?a=commitdiff_plain;h=33823329823c1a76cca6af206ba35f0978c75afa;p=irspy-moved-to-github.git Eliminate temporary variable. --- 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 {