From: Mike Taylor Date: Thu, 16 Nov 2006 17:30:25 +0000 (+0000) Subject: Eliminate temporary variable. X-Git-Tag: CPAN-v1.02~772 X-Git-Url: http://sru.miketaylor.org.uk/cgi-bin?a=commitdiff_plain;h=1a1e0dd6bcdb637a4393093c11f6dc00e4d406eb;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 {