projects
/
irspy-moved-to-github.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
4e4f6c4
)
Correct checking of omitted ID components.
author
Mike Taylor
<mike@indexdata.com>
Thu, 16 Nov 2006 17:27:15 +0000
(17:27 +0000)
committer
Mike Taylor
<mike@indexdata.com>
Thu, 16 Nov 2006 17:27:15 +0000
(17:27 +0000)
web/htdocs/details/edit.mc
patch
|
blob
|
history
diff --git
a/web/htdocs/details/edit.mc
b/web/htdocs/details/edit.mc
index
7f16a1b
..
917c9f3
100644
(file)
--- 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
</%args>
<%args>
$id => undef
</%args>
@@
-8,7
+8,6
@@
my $conn = new ZOOM::Connection("localhost:3313/IR-Explain---1", 0,
elementSetName => "zeerex");
my $rec = '<explain xmlns="http://explain.z3950.org/dtd/2.0/"/>';
if (defined $id && $id ne "") {
elementSetName => "zeerex");
my $rec = '<explain xmlns="http://explain.z3950.org/dtd/2.0/"/>';
if (defined $id && $id ne "") {
- print "Old record '$id'<br/>\n";
# Existing record
my $query = 'rec.id="' . cql_quote($id) . '"';
my $rs = $conn->search(new ZOOM::Query::CQL($query));
# 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
} else {
# New record
- print "New record<br/>\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 "") {
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[<p class="error">You must specify host, port and database name</p>\n];
+ print qq[<p class="error">You must specify host, port and database name.</p>\n];
$r->param(update => 0);
}
$r->param(update => 0);
}
@@
-74,7
+72,7
@@
my @fields =
my $nchanges = 0;
my $update = $r->param("update");
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;
# Update record with submitted data
my %fieldsByKey = map { ( $_->[0], $_) } @fields;
my %data;