Overzealous hijacking of the signup broadcast form
dww - August 22, 2009 - 17:43
| Project: | Signup Status |
| Version: | 6.x-1.x-dev |
| Component: | Code |
| Category: | bug report |
| Priority: | normal |
| Assigned: | dww |
| Status: | closed |
Jump to:
Description
When signup_status hijacks the signup broadcast form, it just does this:
<?php
// 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:
<?php
// 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.

#1
Committed to HEAD.
#2
Automatically closed -- issue fixed for 2 weeks with no activity.