This bug dates back to when I split project_issue into a separate module and then later split the issues settings into their own subtab on the project edit page. :( The validation for the issue-related email addresses was left in project/project.inc's project_project_validate(), which was never firing, since those settings aren't in the main project node form anymore.
Attached patch does the following:
- Adds a proper validation handler for the issues subtab to validate these email addresses in project_issue.module.
- Rips out the dead code that was trying to validate email addresses in project_project_validate().
- Rips out other dead code in there doing silly things to validate/munge the checkboxes. That dates back to revision 1.5 of project.inc, circa 2003. ;) Begone, weird array_filter() code from long before FAPI...
Lest anyone think I'm being careless, I did take the time to try to figure out what this code was trying to do: it's a clumsy way of attempting to filter out bogus checkbox values. However, FAPI does that for us now. Moreover, array_filter(), if you don't give it a callback, will do the equivalent of what project_project_cleanup() was trying to accomplish. This dead validation code is the only place calling that function, so project_project_cleanup() itself is also killed by this patch.
Tested on a local HEAD site and validation is working again on those email addresses, and the checkboxes all behave properly.
Any objections before I commit?
| Comment | File | Size | Author |
|---|---|---|---|
| project_issue_email_validation.patch.txt | 2.56 KB | dww |
Comments
Comment #1
hunmonk commentedcode looks good. works as advertised.
Comment #2
dwwCommitted to HEAD, DRUPAL-5 (for project_issue) and DRUPAL-4-7--2.
The split into the separate subtab never happened in DRUPAL-4-7, and I really don't care enough to figure out if it's actually broken back there or not.
Comment #3
(not verified) commentedAutomatically closed -- issue fixed for two weeks with no activity.