summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
e583f88)
trim values before checking for id creation.
use URI::Escape qw(uri_escape uri_escape_utf8);
use ZOOM;
use ZOOM::IRSpy::Web;
use URI::Escape qw(uri_escape uri_escape_utf8);
use ZOOM;
use ZOOM::IRSpy::Web;
-use ZOOM::IRSpy::Utils qw(utf8param trimField isodate xml_encode cql_target cql_quote
+use ZOOM::IRSpy::Utils qw(utf8param trimField utf8paramTrim isodate xml_encode cql_target cql_quote
irspy_xpath_context irspy_make_identifier
irspy_record2identifier
irspy_identifier2target modify_xml_document
irspy_xpath_context irspy_make_identifier
irspy_record2identifier
irspy_identifier2target modify_xml_document
user => "admin", password => "fruitbat",
elementSetName => "zeerex");
user => "admin", password => "fruitbat",
elementSetName => "zeerex");
-my $protocol = utf8param($r, "protocol");
-my $host = utf8param($r, "host");
-my $port = utf8param($r, "port");
-my $dbname = utf8param($r, "dbname");
+my $protocol = utf8paramTrim($r, "protocol");
+my $host = utf8paramTrim($r, "host");
+my $port = utf8paramTrim($r, "port");
+my $dbname = utf8paramTrim($r, "dbname");
+my $title = utf8paramTrim($r, "title");
if ((!defined $port || $port eq "") &&
(defined $protocol && $protocol ne "")) {
if ((!defined $port || $port eq "") &&
(defined $protocol && $protocol ne "")) {
if (defined $protocol && $protocol ne "" &&
defined $host && $host ne "" &&
defined $port && $port ne "" &&
if (defined $protocol && $protocol ne "" &&
defined $host && $host ne "" &&
defined $port && $port ne "" &&
+ defined $title && $title ne "" &&
defined $dbname && $dbname ne "") {
$newid = irspy_make_identifier($protocol, $host, $port, $dbname);
}
defined $dbname && $dbname ne "") {
$newid = irspy_make_identifier($protocol, $host, $port, $dbname);
}
} elsif (!defined $newid) {
# Tried to create new record but data is insufficient
print qq[<p class="error">
} elsif (!defined $newid) {
# Tried to create new record but data is insufficient
print qq[<p class="error">
- Please specify protocol, host, port and database name.</p>\n];
+ Please specify title, protocol, host, port and database name.</p>\n];
undef $update;
} elsif ($host !~ /^\w+\.[\w.]*\w$/i) {
print qq[<p class="error">
undef $update;
} elsif ($host !~ /^\w+\.[\w.]*\w$/i) {
print qq[<p class="error">