From: Mike Taylor Date: Thu, 16 Nov 2006 17:27:15 +0000 (+0000) Subject: Correct checking of omitted ID components. X-Git-Tag: CPAN-v1.02~773 X-Git-Url: http://sru.miketaylor.org.uk/cgi-bin?a=commitdiff_plain;h=713149feeca669b0bf5702f55a89cd681a648f1e;p=irspy-moved-to-github.git Correct checking of omitted ID components. --- diff --git a/web/htdocs/details/edit.mc b/web/htdocs/details/edit.mc index 7f16a1b..917c9f3 100644 --- a/web/htdocs/details/edit.mc +++ b/web/htdocs/details/edit.mc @@ -1,4 +1,4 @@ -%# $Id: edit.mc,v 1.16 2006-11-16 17:14:46 mike Exp $ +%# $Id: edit.mc,v 1.17 2006-11-16 17:27:15 mike Exp $ <%args> $id => undef @@ -8,7 +8,6 @@ my $conn = new ZOOM::Connection("localhost:3313/IR-Explain---1", 0, elementSetName => "zeerex"); my $rec = ''; if (defined $id && $id ne "") { - print "Old record '$id'
\n"; # Existing record my $query = 'rec.id="' . cql_quote($id) . '"'; my $rs = $conn->search(new ZOOM::Query::CQL($query)); @@ -21,14 +20,13 @@ if (defined $id && $id ne "") { } else { # New record - print "New record
\n"; my $host = $r->param("host"); my $port = $r->param("port"); my $dbname = $r->param("dbname"); if (!defined $host || $host eq "" || !defined $port || $port eq "" || !defined $dbname || $dbname eq "") { - print qq[

You must specify host, port and database name

\n]; + print qq[

You must specify host, port and database name.

\n]; $r->param(update => 0); } @@ -74,7 +72,7 @@ my @fields = my $nchanges = 0; my $update = $r->param("update"); -if (defined $update) { +if ($update) { # Update record with submitted data my %fieldsByKey = map { ( $_->[0], $_) } @fields; my %data;