[Fusionforge-commits] r10513 - trunk/src/www/forum

Alain Peyrat aljeux at libremir.placard.fr.eu.org
Thu Sep 16 21:05:07 CEST 2010


Author: aljeux
Date: 2010-09-16 21:05:07 +0200 (Thu, 16 Sep 2010)
New Revision: 10513

Modified:
   trunk/src/www/forum/attachment.php
Log:
Display attachement inline if .txt for forums.

Modified: trunk/src/www/forum/attachment.php
===================================================================
--- trunk/src/www/forum/attachment.php	2010-09-16 19:05:02 UTC (rev 10512)
+++ trunk/src/www/forum/attachment.php	2010-09-16 19:05:07 UTC (rev 10513)
@@ -201,7 +201,13 @@
 header('Last-Modified: ' . $last . ' GMT');
 header('ETag: "' . db_result($res,0,'attachmentid') . '"');
 
-header('Content-disposition: attachment; filename="' . db_result($res,0,'filename') . '"');
+if ($extension != 'txt') {
+	header("Content-disposition: inline; filename=\"" . db_result($res,0,'filename') . "\"");
+	header('Content-transfer-encoding: binary');
+}	else {
+	header("Content-disposition: attachment; filename=\"" . db_result($res,0,'filename') . "\"");
+}
+
 header('Content-Length: ' . db_result($res,0,'filesize') );
 
 




More information about the Fusionforge-commits mailing list