Closed (fixed)
Project:
FileField Upload Limit
Version:
5.x-1.0
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
10 Nov 2008 at 17:10 UTC
Updated:
6 Dec 2008 at 11:51 UTC
As far as I could tell, and I may be wrong, you can't store filefield upload limits for multiple fields in a content type. It seems the code did not allow for a serialised array already being stored using get/set_variable.
So, if you you have a content type with multiple file fields, when you set a limit for one, then set a limit for the other, the first is deleted/overwritten.
I've attached a solution which seemed to solve my issue.
Forgive me if I'm wrong...this is my first issue request.
| Comment | File | Size | Author |
|---|---|---|---|
| fieldfield_upload_limit.patch | 1.25 KB | bendodd |
Comments
Comment #1
greg.harveyHi there,
You're probably correct. I didn't even consider that eventuality (a mantra of mine - write code you definitely need today, not code you think you might need tomorrow... ;-)
Thanks for the patch. I will review ASAP and commit to HEAD if it's good.
Comment #2
greg.harveyPatch applied! Thank you!
Word of advice... when contributing Drupal code, your SDK should be set to use a double-space instead of a tab for indenting. This was such a small patch it didn't matter, but you'll find larger contributions get rejected by the maintainers if all the indents are tabs instead of double spaces.
See the Drupal coding standards page for more info:
http://drupal.org/coding-standards
And congrats on your first successful contribution! =)