X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=httemplate%2Fedit%2Fprocess%2Fcust_main_attach.cgi;h=cdf93ceabb3b6f4f07707196de0baa7c3f5446c8;hb=d45dd4a826f314fb5459747590d3e11cd80c211f;hp=569500246119fde111300570d0ff283f1101c50c;hpb=76b22e66bf8e615def0a24cd8cda23c3949eae70;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');