mirror of https://github.com/BOINC/boinc.git
Drupal: Add new admin parameter to boincteam module.
This commit is contained in:
parent
ec8fc74a03
commit
e585b1b9f8
|
@ -180,7 +180,7 @@ function boincteam_create_form_submit($form, &$form_state) {
|
|||
}
|
||||
else {
|
||||
drupal_set_message(t('Teams cannot be created at this time. The @project administrators have been notified.', array('@project' => PROJECT)));
|
||||
rules_invoke_event('boincteam_create_team_error', $values['name']);
|
||||
rules_invoke_event('boincteam_create_team_error', $values['name'], variable_get('boinc_admin_mailing_list_subject_tag', ''));
|
||||
watchdog('BOINC team', 'BOINC teams cannot be created for an unknown
|
||||
reason.', 'error');
|
||||
return FALSE;
|
||||
|
@ -215,7 +215,7 @@ function boincteam_create_form_submit($form, &$form_state) {
|
|||
}
|
||||
else {
|
||||
drupal_set_message(t('Teams cannot be created at this time. The @project administrators have been notified.', array('@project' => PROJECT)));
|
||||
rules_invoke_event('boincteam_create_team_nopathauto_error', $values['name']);
|
||||
rules_invoke_event('boincteam_create_team_nopathauto_error', $values['name'], variable_get('boinc_admin_mailing_list_subject_tag', ''));
|
||||
watchdog('BOINC team', 'BOINC teams require the Pathauto module. Teams
|
||||
cannot be created.', 'error');
|
||||
}
|
||||
|
|
|
@ -40,5 +40,15 @@ function rules_events_hook_boincteam_arguments() {
|
|||
'label' => 'team name',
|
||||
'required' => TRUE,
|
||||
),
|
||||
) + rules_events_global_user_argument();
|
||||
) + rules_events_hook_boincteam_adminnotify_argument();
|
||||
}
|
||||
|
||||
function rules_events_hook_boincteam_adminnotify_argument() {
|
||||
return array(
|
||||
'subject_tag' => array(
|
||||
'type' => 'string',
|
||||
'label' => 'Subject tag for email filtering',
|
||||
'required' => TRUE,
|
||||
),
|
||||
) + rules_events_global_user_argument();
|
||||
}
|
Loading…
Reference in New Issue