--- og_multiple_mandatory_groups_by_role.module	2009-09-14 11:31:18.316666800 -0400
+++ og_multiple_mandatory_groups_by_role.module.orig	2009-09-14 11:46:50.496821300 -0400
@@ -129,7 +129,7 @@ function og_multiple_mandatory_groups_by
     $items['admin/og/og_multiple_mandatory_groups_by_role/groups_delete'] = array( //delete a group from available groups list
     'title' => 'Delete group from availability list',
     'page callback' => 'drupal_get_form',
-    'page arguments' => array('og_multiple_mandatory_groups_by_role_group_confirm_delete',4),
+    'page arguments' => array('og_multiple_mandatory_groups_by_role_group_confirm_delete'),
     'access callback' => 'user_access',
     'access arguments' => array('administer og mandatory groups by role'),
     'type' => MENU_CALLBACK,
@@ -643,23 +643,18 @@ function og_multiple_mandatory_groups_by
   if ($admin = user_access('administer og mandatory groups by role')) {
 
     $option_result = db_query("SELECT n.nid, n.title, o.* FROM {node} n INNER JOIN {og} o ON n.nid = o.nid WHERE (o.og_selective = %d OR o.og_selective = %d) ORDER BY n.title", OG_CLOSED, OG_OPEN);
-    if( db_affected_rows($option_result) <= 0 ) {
-        $options = array( "" => "(no groups enabled)" );
-    }
-    else {
-        while ($group = db_fetch_object($option_result)) {
-          $options[$group->nid] = $group->title;
-          switch ($group->og_selective) {
-            case OG_OPEN:
-              $options[$group->nid] .= ' | ' .t('Open group, users can unsubscribe.');
-              break;
-            case OG_CLOSED:
-              $options[$group->nid] .= ' | ' .t('Closed group, users can not leave.');
-              break;
-          }
-        }
+    while ($group = db_fetch_object($option_result)) {
+      $options[$group->nid] = $group->title;
+      switch ($group->selective) {
+        case OG_OPEN:
+          $options[$group->nid] .= ' | ' .t('Open group, users can unsubscribe.');
+          break;
+        case OG_CLOSED:
+          $options[$group->nid] .= ' | ' .t('Closed group, users can not leave.');
+          break;
+      }
     }
-
+    
     $added = _og_multiple_mandatory_groups_by_groups_get_added();
     foreach ($added as $group_id => $name) {//remove from the select, groups we're already working with
       if (array_key_exists($group_id, $options)) {
@@ -753,11 +748,10 @@ function theme_og_multiple_mandatory_gro
 /**
  * Returns a confirmation page for deleting a group from the mandatory group availability table.
  *
- * @param array $a API array.
  * @param integer $gid Value of group to be deleted; passed in from path.
  * @return array $form The GID is passed to the submit.
  */
-function og_multiple_mandatory_groups_by_role_group_confirm_delete($a,$gid=NULL) {
+function og_multiple_mandatory_groups_by_role_group_confirm_delete($gid= NULL) {
   if ($gid == NULL) {
     drupal_goto('admin/og/og_multiple_mandatory_groups_by_role/groups');
     return;
@@ -801,11 +795,10 @@ function og_multiple_mandatory_groups_by
 /**
  * Returns a confirmation page for deleting a group from the mandatory group availability table.
  *
- * @param array $a API array.
  * @param integer $gid Value of group to be deleted; passed in from path.
  * @return array $form The GID is passed to the submit.
  */
-function og_multiple_mandatory_groups_by_role_group_confirm_delete_unsubscribe($a,$gid=NULL) {
+function og_multiple_mandatory_groups_by_role_group_confirm_delete_unsubscribe($gid= NULL) {
   if ($gid == NULL) {
     drupal_goto('admin/og/og_multiple_mandatory_groups_by_role/groups');
     return;
@@ -846,7 +839,7 @@ function og_multiple_mandatory_groups_by
   }
   $dbquery = db_query('DELETE FROM {og_multi_mand_groups_role_groups} WHERE gid = %d', $form_state['values']['gid']);
   if ($dbquery) {
-    drupal_set_message(t('The group \'%gid\' has been removed from the mandatory group availability table.', array('%gid' => $form_state['values']['name'])));
+    drupal_set_message(t('The group %gid has been removed from the mandatory group availability table.', array('%gid' => $form_state['values']['name'])));
     watchdog('content', 'og_multiple_mandatory_groups_by_role_groups: deleted %gid.', array('%gid' => $form_state['values']['name']));
   }
   $return_address = 'admin/og/og_multiple_mandatory_groups_by_role/groups';
