|
From: Benjamin C. <bc...@us...> - 2003-05-20 03:08:05
|
Update of /cvsroot/phpbt/phpbt
In directory sc8-pr-cvs1:/tmp/cvs-serv24275
Modified Files:
attachment.php
Log Message:
Patch from Paul Duncan for improving attachment download with IE 5
Index: attachment.php
===================================================================
RCS file: /cvsroot/phpbt/phpbt/attachment.php,v
retrieving revision 1.20
retrieving revision 1.21
diff -u -r1.20 -r1.21
--- attachment.php 28 Oct 2002 22:03:21 -0000 1.20
+++ attachment.php 20 May 2003 03:08:01 -0000 1.21
@@ -164,10 +164,15 @@
}
} elseif (isset($_pv['submit'])) {
$perm->check('Editbug');
- add_attachment($_pv['bugid'], $_pv['description']);
+ add_attachment($_pv['bugid'], $_pv['description']);
} elseif (isset($_gv['attachid'])) {
if (list($filename, $mimetype) = grab_attachment($_gv['attachid'])) {
- header("Content-type: $mimetype");
+ $base = basename($filename);
+ header("Content-Disposition: attachment; filename=\"$base\"");
+ header("Content-Type: $mimetype");
+ header("Connection: close");
+ header("Pragma: nocache");
+ header("Expires: 0 ");
@readfile($filename);
exit;
}
|