Index: og_promote.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/og_promote/og_promote.module,v
retrieving revision 1.3.2.1
diff -u -p -r1.3.2.1 og_promote.module
--- og_promote.module	24 Nov 2006 14:48:16 -0000	1.3.2.1
+++ og_promote.module	18 Feb 2007 21:31:50 -0000
@@ -82,22 +82,25 @@ function og_promote_settings() {
 
   $options = array();
   $values = array();
-  $result = db_query("SELECT n.nid, n.title, o.* FROM {node} n INNER JOIN {og} o ON n.nid = o.nid WHERE n.type = 'og' ORDER BY n.title");
-  while ($group = db_fetch_object($result)) {
-    $options[$group->nid] = check_plain($group->title);
-    switch ($group->selective) {
-      case OG_OPEN:
-        $options[$group->nid] .= check_plain($row->title) .' '. t('(open group)');
-        break;
-      case OG_MODERATED:
-        $options[$group->nid] .= check_plain($row->title) .' '. t('(moderated group)');
-        break;
-      case OG_INVITE_ONLY:
-        $options[$group->nid] .= check_plain($row->title) .' '. t('(invite only group)');
-        break;
-      case OG_CLOSED:
-        $options[$group->nid] .= check_plain($row->title) .' '. t('(closed group)');
-        break;
+  $types = variable_get('og_node_types', array('og'));
+  foreach ($types as $type) {
+    $result = db_query("SELECT n.nid, n.title, o.* FROM {node} n INNER JOIN {og} o ON n.nid = o.nid WHERE n.type = '%s' ORDER BY n.title", $type);
+    while ($group = db_fetch_object($result)) {
+      $options[$group->nid] = check_plain($group->title);
+      switch ($group->selective) {
+        case OG_OPEN:
+          $options[$group->nid] .= check_plain($row->title) .' '. t('(open group)');
+          break;
+        case OG_MODERATED:
+          $options[$group->nid] .= check_plain($row->title) .' '. t('(moderated group)');
+          break;
+        case OG_INVITE_ONLY:
+          $options[$group->nid] .= check_plain($row->title) .' '. t('(invite only group)');
+          break;
+        case OG_CLOSED:
+          $options[$group->nid] .= check_plain($row->title) .' '. t('(closed group)');
+          break;
+      }
     }
   }
   if (count($options)) {
