summaryrefslogtreecommitdiffstats
path: root/CGI.pl
diff options
context:
space:
mode:
Diffstat (limited to 'CGI.pl')
-rw-r--r--CGI.pl6
1 files changed, 2 insertions, 4 deletions
diff --git a/CGI.pl b/CGI.pl
index c12ce8e5e..0d9762b22 100644
--- a/CGI.pl
+++ b/CGI.pl
@@ -29,11 +29,9 @@ require 'globals.pl';
sub GeneratePersonInput {
my ($field, $required, $def_value, $extraJavaScript) = (@_);
- if (!defined $extraJavaScript) {
- $extraJavaScript = "";
- }
+ $extraJavaScript ||= "";
if ($extraJavaScript ne "") {
- $extraJavaScript = "onChange=\" $extraJavaScript \"";
+ $extraJavaScript = "onChange=\"$extraJavaScript\"";
}
return "<INPUT NAME=\"$field\" SIZE=32 $extraJavaScript VALUE=\"$def_value\">";
}