2c2,3
< // $Id: og_mandatory_group.module,v 1.10 2007/09/13 01:24:00 pwolanin Exp $
---
> // $Id: og_mandatory_group.module,v 1.10 2008/06/12 00:00:00 darren.ferguson Exp $
> 
5c6
<  * 
---
>  *
7,8c8,10
< function og_mandatory_group_help($section) {
<   switch ($section) {
---
> function og_mandatory_group_help($path, $arg) {
>   $output = '';
>   switch ($path) {
12c14
<       return $output;
---
>       break;
13a16
>    return $output;
18c21
<  * 
---
>  *
20c23
< function og_mandatory_group_form_alter($form_id, &$form) {
---
> function og_mandatory_group_form_alter(&$form, $form_state, $form_id) {
32c35
<           '#value' => TRUE, 
---
>           '#value' => TRUE,
39c42
<     } 
---
>     }
41c44
<       if ($mandatory_group && $mandatory_group_in_form) {    
---
>       if ($mandatory_group && $mandatory_group_in_form) {
53c56
<  * 
---
>  *
56c59
<   
---
> 
72c75
<       break;    
---
>       break;
88,99c91,102
<           case OG_OPEN:
<             $groups .= check_plain($row->title) .' '. t('(open group)');
<             break;
<           case OG_MODERATED:
<             $groups .= check_plain($row->title) .' '. t('(moderated group)');
<             break;
<           case OG_INVITE_ONLY:
<             $groups .= check_plain($row->title) .' '. t('(invite only group)');
<             break;
<           case OG_CLOSED:
<             $groups .= check_plain($row->title) .' '. t('(closed group)');
<             break;
---
>                 case OG_OPEN:
>                   $groups .= check_plain($row->title) .' '. t('(open group)');
>                   break;
>                 case OG_MODERATED:
>                   $groups .= check_plain($row->title) .' '. t('(moderated group)');
>                   break;
>                 case OG_INVITE_ONLY:
>                   $groups .= check_plain($row->title) .' '. t('(invite only group)');
>                   break;
>                 case OG_CLOSED:
>                   $groups .= check_plain($row->title) .' '. t('(closed group)');
>                   break;
127c130
<  * 
---
>  *
129,143c132,140
< function og_mandatory_group_menu($may_cache) {
< 
<   $items = array();
<   
<   if ($may_cache) {  
<     $items[] = array(
<        'path' => 'admin/og/og_mandatory_group',
<        'title' => t('Organic groups mandatory group'),
<        'description' => t('Make one group mandatory for new users and/or require new users to pick a group.'),
<        'callback' => 'drupal_get_form',
<        'callback arguments' => 'og_mandatory_group_settings',
<        'access' => user_access('administer site configuration'), 
<       );
<   }
<   return $items;  
---
> function og_mandatory_group_menu() {
>   $items['admin/og/og_mandatory_group'] = array(
>     'title'            => t('Organic groups mandatory group'),
>     'description'      => t('Make one group mandatory for new users and/or require new users to pick a group.'),
>     'page callback'    => 'drupal_get_form',
>     'page arguments'   => array('og_mandatory_group_settings'),
>     'access arguments' => array('administer site configuration'),
>   );
>   return $items;
148c145
<  * 
---
>  *
167c164
<   );  
---
>   );
169,170c166,167
<     '#type' => 'radios', 
<     '#options' => $options, 
---
>     '#type' => 'radios',
>     '#options' => $options,
173c170
<   
---
> 
175c172
<       '#type' => 'checkbox', 
---
>       '#type' => 'checkbox',
179c176
<   $form['#validate'] = array('og_mandatory_group_settings_validate' => array());
---
>   $form['#validate'][] = 'og_mandatory_group_settings_validate';
183,184c180,181
< function og_mandatory_group_settings_validate($form_id, $form_values, $form) {
<   if (!isset($form['groups']['og_mandatory_group']['#options'][$form_values['og_mandatory_group']])) {
---
> function og_mandatory_group_settings_validate($form, &$form_state) {
>   if (!isset($form['groups']['og_mandatory_group']['#options'][$form_state['values']['og_mandatory_group']])) {
