|
From: Benjamin C. <bc...@us...> - 2001-08-11 17:24:34
|
Update of /cvsroot/phpbt/phpbt
In directory usw-pr-cvs1:/tmp/cvs-serv32484
Modified Files:
bug.php attachment.php
Log Message:
Slight tweaks
Index: bug.php
===================================================================
RCS file: /cvsroot/phpbt/phpbt/bug.php,v
retrieving revision 1.23
retrieving revision 1.24
diff -u -r1.23 -r1.24
--- bug.php 2001/08/11 17:09:24 1.23
+++ bug.php 2001/08/11 17:24:30 1.24
@@ -420,12 +420,17 @@
if ($perm->have_perm('Administrator')) {
$action .= " | <a href='attachment.php?del={$att['AttachmentID']}'>Delete</a>";
}
+ if ($att['FileSize'] > 1024) {
+ $attsize = number_format((round($att['FileSize']) / 1024 * 100) / 100).'k';
+ } else {
+ $attsize = number_format($att['FileSize']).'b';
+ }
$t->set_var(array(
'bgcolor' => (++$j % 2 == 0) ? '#dddddd' : '#ffffff',
'attid' => $att['AttachmentID'],
'attname' => stripslashes($att['FileName']),
'attdesc' => stripslashes($att['Description']),
- 'attsize' => number_format($att['FileSize']).'k',
+ 'attsize' => $attsize,
'atttype' => $att['MimeType'],
'attdate' => date(DATEFORMAT, $att['CreatedDate']),
'attaction' => $action
Index: attachment.php
===================================================================
RCS file: /cvsroot/phpbt/phpbt/attachment.php,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- attachment.php 2001/08/11 17:09:24 1.3
+++ attachment.php 2001/08/11 17:24:31 1.4
@@ -155,6 +155,7 @@
if (list($filename, $mimetype) = grab_attachment($_gv['attachid'])) {
header("Content-type: $mimetype");
@readfile($filename);
+ exit;
}
} else {
$perm->check('User');
|