Closed (fixed)
Project:
Mollom
Version:
6.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Reporter:
Created:
6 May 2010 at 10:11 UTC
Updated:
24 Apr 2014 at 17:13 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
dries commentedI'd be OK with extending
hook_mollom_form_info()with a'mail id' => array('foo', 'bar')or'mail id callback' => '_my_mail_ids'(or something similar).A 'mail id' field would probably cover 90% of the use cases so I don't think we need a callback. The advantage of a callback is that it becomes possible to deal with dynamic mail ids, but I'm not sure that actually exists. In the cases a list of hard-coded ids is not sufficient, people could always fallback on a custom
_mail_alter()function like we do now.Thoughts?
Comment #2
dave reidProviding mail IDs in hook_mollom_form_info() makes a whole lotta sense instead of us hard-coding them. I also agree with just going with the simpler array of mail IDs rather than a callback. Like Dries says other modules can implement hook_mail_alter(). Patch to arrive shortly.
Comment #3
dave reidInitial patch for Drupal 7.
Comment #5
dries commentedThis patch implements what I had in mind, and I think it makes sense to associate the mail ids with the hook_mollom_form_list().
Comment #6
dave reidFixed the exceptions and tested locally.
Comment #7
dave reidI think this one is ready.
Comment #8
pieterdcI think it fits the need.
Ps: I've never seen such a quick feature request response. Wow!
Comment #9
dries commentedCommitted to CVS HEAD. Thanks Dave.
1. Let's backport this patch to DRUPAL-6--1.
2. Would also be good to write some tests but I think we have an issue for testing the mail functionality.
Comment #10
dave reidRe-rolled for D6, tested locally on my install and added the correct report links.
Comment #11
dave reidI don't get it. Do I need to upload with out the '-D6' at the end of the patch file to get it to run for testing? :/
Comment #13
dries commentedThe tests still have ...
* @todo Test mail sending with assertMail() now that it is available.... so it might not be super useful to test this. I'll try to run the test on my local machine.
Comment #14
dries commentedTests passed locally so committed this to DRUPAL-6--1. Thanks Dave.