X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=httemplate%2Fedit%2Fprocess%2Fcust_main_attach.cgi;h=cdf93ceabb3b6f4f07707196de0baa7c3f5446c8;hb=07ed221540128b8c75f4cb5a2af1e01b25fa8e18;hp=569500246119fde111300570d0ff283f1101c50c;hpb=cf54023e010df76e0c39ac70902877d7c4c94c6e;p=freeside.git diff --git a/httemplate/edit/process/cust_main_attach.cgi b/httemplate/edit/process/cust_main_attach.cgi index 569500246..cdf93ceab 100644 --- a/httemplate/edit/process/cust_main_attach.cgi +++ b/httemplate/edit/process/cust_main_attach.cgi @@ -7,11 +7,7 @@ % $act = 'purged' if($attachnum and $purge); % $act = 'undeleted' if($attachnum and $undelete); % $act = 'deleted' if($attachnum and $delete); -<% header('Attachment ' . $act ) %> - - +<& /elements/popup-topreload.html, mt("Attachment $act") &> % } <%init> @@ -55,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); } @@ -69,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');