Closed (fixed)
Project:
Signup Status
Version:
6.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Reporter:
Created:
22 Aug 2009 at 17:43 UTC
Updated:
5 Sep 2009 at 17:50 UTC
When signup_status hijacks the signup broadcast form, it just does this:
// Overwrite the submit hook, in case the user selects a specific status.
$form['#submit'] = array('signup_status_signup_broadcast_form_submit');
That would break anyone *else* trying to alter this form to do anything. A safer approach would be this:
// Replace the default submit handler in case the user restricts by status.
foreach ($form['#submit'] as $key => $handler) {
if ($handler == 'signup_broadcast_form_submit') {
unset($form['#submit'][$key]);
break;
}
}
$form['#submit'][] = 'signup_status_signup_broadcast_form_submit';
That would still let other things alter this form and trigger other actions when it's submitted, while still preventing signup's default submit handler from being called.
Comments
Comment #1
dwwCommitted to HEAD.