Simple Machines Community Forum

Customizing SMF => Modifications and Packages => Topic started by: Joshua Dickerson on October 16, 2009, 06:41:20 PM

Title: Stop Parsing Attachments in Display.php
Post by: Joshua Dickerson on October 16, 2009, 06:41:20 PM
Link to Mod (http://custom.simplemachines.org/mods/index.php?mod=2214)

There are several bugs that have risen because SMF tries to correct line endings depending on the end-user's operating system. This is good for people that don't know what an editor is. For those of us that work with complex text documents, this causes corrupted files.

This mod removes the functionality in Display.php -> Download().

See the bug report: http://dev.simplemachines.org/mantis/view.php?id=3865
Title: Re: Stop Parsing Attachments in Display.php
Post by: Sudhakar Arjunan on October 17, 2009, 09:33:45 AM
Hey i could not understand it .

If possible, help me out to learn about this mod using some detailed documents and pics.
Title: Re: Stop Parsing Attachments in Display.php
Post by: Joshua Dickerson on October 17, 2009, 11:40:37 AM
There's no pics. SMF tries to convert line endings depending on your operating system when a text document is downloaded from an attachment. This mod removes that and sends you the raw attachment.
Title: Re: Stop Parsing Attachments in Display.php
Post by: aED on October 20, 2009, 11:09:02 AM
Does this bug only affects text document? How about zip files?
Title: Re: Stop Parsing Attachments in Display.php
Post by: Arantor on October 20, 2009, 11:09:57 AM
It only applies to files with the following extensions: 'txt', 'css', 'htm', 'html', 'php', 'xml'

All other files are left alone anyway. This just removes one piece of code that gets run, so all files are treated as binary.