diff -up original/invite_admin.inc fixed/invite_admin.inc --- original/invite_admin.inc 2008-10-06 15:03:08.000000000 +0200 +++ fixed/invite_admin.inc 2009-04-24 14:38:00.000000000 +0200 @@ -50,26 +50,25 @@ function invite_settings() { '#collapsed' => TRUE, ); - foreach ($roles as $role) { - $role_no_space = str_replace(' ', '_', $role); - $form['role'][$role_no_space] = array( + foreach ($roles as $rid => $role) { + $form['role'][$rid] = array( '#type' => 'fieldset', '#title' => t('@role settings', array('@role' => drupal_ucfirst($role))), '#collapsible' => TRUE, '#collapsed' => TRUE, ); - $form['role'][$role_no_space]['invite_target_role_'. $role_no_space] = array( + $form['role'][$rid]['invite_target_role_'. $rid] = array( '#type' => 'select', '#title' => t('Target role'), - '#default_value' => variable_get('invite_target_role_'. $role_no_space, DRUPAL_AUTHENTICATED_RID), + '#default_value' => variable_get('invite_target_role_'. $rid, DRUPAL_AUTHENTICATED_RID), '#options' => $target_roles, '#description' => t('You may choose to add invited users to another role (in addition to the default role set in the general section) when they have been invited by a member of %role.', array('%role' => $role)), '#required' => TRUE, ); - $form['role'][$role_no_space]['invite_maxnum_'. $role_no_space] = array( + $form['role'][$rid]['invite_maxnum_'. $rid] = array( '#type' => 'select', '#title' => t('Invitation limit'), - '#default_value' => variable_get('invite_maxnum_'. $role_no_space, INVITE_UNLIMITED), + '#default_value' => variable_get('invite_maxnum_'. $rid, INVITE_UNLIMITED), '#options' => array(5 => 5, 10 => 10, 20 => 20, 50 => 50, 100 => 100, 500 => 500, 1000 => 1000, INVITE_UNLIMITED => t('unlimited')), '#description' => t('Allows to limit the total number of invitations members of %role can send.', array('%role' => $role)), '#multiple' => FALSE,