Thanks for the module! Here is a patch the removes the need to patch file.inc.
| Comment | File | Size | Author |
|---|---|---|---|
| #4 | xsend_dont_hack_core.patch | 5.3 KB | grendzy |
| xsend_dont_hack_core.patch | 5.38 KB | grendzy |
Thanks for the module! Here is a patch the removes the need to patch file.inc.
| Comment | File | Size | Author |
|---|---|---|---|
| #4 | xsend_dont_hack_core.patch | 5.3 KB | grendzy |
| xsend_dont_hack_core.patch | 5.38 KB | grendzy |
Comments
Comment #1
grendzy commentedComment #2
grendzy commentedwhoops. 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
Comment #3
hypertext200Thanks for the patch I will test it and add to the module
Comment #4
grendzy commentedheshanmw, 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:
Comment #5
grendzy commentedComment #6
hypertext200Comment #7
hypertext200Comment #8
hypertext200Fixed in latest version.
Comment #9
gribnif commentedOne 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.
Comment #10
grendzy commentedI 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. :-)