summaryrefslogtreecommitdiff
path: root/httemplate/edit/process
diff options
context:
space:
mode:
authorIvan Kohler <ivan@freeside.biz>2017-07-24 14:02:57 -0700
committerIvan Kohler <ivan@freeside.biz>2017-07-24 14:02:57 -0700
commit67d171a04ecbccbfd7d5fc2f1be2810299008c15 (patch)
tree05b6ebc61062513e961d9e37d3f62d81b21a0f88 /httemplate/edit/process
parent2371880187dcd6a8dbc55be0ddc70a7436ffbf5f (diff)
scalar param
Diffstat (limited to 'httemplate/edit/process')
-rw-r--r--httemplate/edit/process/cust_main_attach.cgi8
1 files changed, 5 insertions, 3 deletions
diff --git a/httemplate/edit/process/cust_main_attach.cgi b/httemplate/edit/process/cust_main_attach.cgi
index 20673dc9b..cdf93ceab 100644
--- a/httemplate/edit/process/cust_main_attach.cgi
+++ b/httemplate/edit/process/cust_main_attach.cgi
@@ -51,7 +51,7 @@ if($attachnum) {
('_date', 'otaker', 'body', 'disabled');
$new->filename($filename || $old->filename);
$new->mime_type($cgi->param('mime_type') || $old->mime_type);
- $new->title($cgi->param('title'));
+ $new->title( scalar($cgi->param('title')) );
if($delete and not $old->disabled) {
$new->disabled(time);
}
@@ -65,8 +65,10 @@ else { # This is a new attachment, so require a file.
if($filename) {
$new->filename($filename);
# use the original filename here, not the stripped form
- $new->mime_type($cgi->uploadInfo($cgi->param('file'))->{'Content-Type'});
- $new->title($cgi->param('title'));
+ $new->mime_type(
+ $cgi->uploadInfo( scalar($cgi->param('file')) )->{'Content-Type'}
+ );
+ $new->title( scalar($cgi->param('title')) );
local $/;
my $fh = $cgi->upload('file');