Posted by grendzy on October 13, 2009 at 5:26pm
| Project: | Fast File Transfer with X-send file |
| Version: | 6.x-1.x-dev |
| Component: | Code |
| Category: | task |
| Priority: | normal |
| Assigned: | heshan.lk |
| Status: | closed (fixed) |
Issue Summary
Thanks for the module! Here is a patch the removes the need to patch file.inc.
| Attachment | Size |
|---|---|
| xsend_dont_hack_core.patch | 5.38 KB |
Comments
#1
#2
whoops. Sorry for the multiple posts. Anyway, what this does is create an alternative menu item. So instead of /system/files/sample.jpg, you have /xsend/sample.jpg. Then you add the following .htaccess rule to let the new path take over:
RewriteRule ^system/files/(.*) index.php?q=xsend/$1
#3
Thanks for the patch I will test it and add to the module
#4
heshanmw, thanks! I also realized the rewrite rule isn't needed either; instead hook_menu_alter can change the callback for system/files.
Here's an updated patch:
#5
#6
#7
#8
Fixed in latest version.
#9
One advantage of the original patch (which, IMHO, should be included in core!) is that modules which call the file_transfer() function directly will benefit from it. The method adopted by this issue removes the patch, thereby degrading performance for code that calls the function directly.
#10
I can see your point (other modules do use this function, e.g. imagecache, alfresco). Still patching core is rarely a good solution. Why not work with the module maintainers to provide integration with xsend?
Or if you like applying patches you could always patch the modules. :-)