My Drupal Patches
I'm a big fan of Drupal. Every one in a awhile, however, I'll come across a bug in one of its modules. Since I know PHP, I've found that it's usually quicker for me to find and fix the problem, and submit the patch to the author, rather than just wait for the problem to be fixed. Plus, it takes some of the workload off of the author.
Here are the patches I have written:
- Acidfree 4.6.0:
- Fix for breaking the Statistics module.
The function acidfree_page_creator() does not restore the value of $_GET['q'] after it is done working with it. This results in incorrect data being logged by the statistics module. (When viewing a picture, the log shows that the parent was viewed instead, according to the link in the file)
This patch fixes the problem by restoring the value of $_GET['q'] at the end of the function. (The bug report)
- Fix for private file attachments - While writing the patch to make Filemanager honor private attachments, I discovered that Acidfree prevented the files from being downloaded with a "permission denied" error.
The root cause of this problem was the function acidfree_filemanager_download(). If it could not find an acidfree node for a particular file (always true for private files), it would incorrectly assume that the file did not exist and return false, which would in turn generate a permission denied error.
This patch fixes the problem by changing the code so that when no acidfree node is found, it is assumed that the node is handled by another module and that acidfree should not take any responsibility for it, at which point it returns true. (The bug report)
- This patch fixes a very minor issue where images that were inlined with the
[acidfree:xx]tag had a style that setalign=left. The patch removes that code so you can position an inlined image however you like. (The bug report)
- Fix for breaking the Statistics module.
- Filemanager 4.6.0:
- Fix for private file attachments - This is a complex case. If you have the attachment module installed it uses a module called filemanager. Filemanager has a seting where you can have it make all attachments to nodes private. However, that really doesn't work. Checking the box to make attachments private simply Does Not Work.
This patch modifies the attachment.module file so that it really does honor the flag to make attachments private. (The bug report)
- Fix for private file attachments - This is a complex case. If you have the attachment module installed it uses a module called filemanager. Filemanager has a seting where you can have it make all attachments to nodes private. However, that really doesn't work. Checking the box to make attachments private simply Does Not Work.
- Poormanscron 4.6.0:
- This patch does two things to help enhance poormanscron. First, it logs a message for each cron function that it is about to run. This is helpful for determining what a long running crontab is hung up on. (http://drupal.org/node/46890)
Second, it loads the file common.inc. I observed an issue with poormanscron where the files does not get loaded all of the time. Normally, this is not an issue, but some crontabs, such as the one from the acidfree module, need functions which are in this file. (http://drupal.org/node/46891)
- This patch does two things to help enhance poormanscron. First, it logs a message for each cron function that it is about to run. This is helpful for determining what a long running crontab is hung up on. (http://drupal.org/node/46890)
- Webform 4.6.0
- I had some problems when trying to do comma-delimited exports and load them into NeoOffice. There were issues with commas in the data, and issues with people having commas in IP addresses, which happens when a submission comes from someone behind a proxy.
Anyway, I've written this patch that now exports data into tab delimited files, and put quotes around the IP addresses.
- I had some problems when trying to do comma-delimited exports and load them into NeoOffice. There were issues with commas in the data, and issues with people having commas in IP addresses, which happens when a submission comes from someone behind a proxy.
delicious
digg
reddit
newsvine
furl
google
yahoo
technorati