You are here

function og_all_groups_options in Organic groups 6

Same name and namespace in other branches
  1. 5.8 og.module \og_all_groups_options()
  2. 5 og.module \og_all_groups_options()
  3. 5.2 og.module \og_all_groups_options()
  4. 5.3 og.module \og_all_groups_options()
  5. 5.7 og.module \og_all_groups_options()
  6. 6.2 og.module \og_all_groups_options()
11 calls to og_all_groups_options()
og_add_group_action_form in modules/og_actions/og_actions.module
Configuration form for Add Group action.
og_approve_user_action_form in modules/og_actions/og_actions.module
Configuration form for Approve User action.
og_demote_user_action_form in modules/og_actions/og_actions.module
Configuration form for Demote User action.
og_deny_user_action_form in modules/og_actions/og_actions.module
Configuration form for Deny User action.
og_form_add_og_audience in ./og.module
Helper method to add OG audience fields to a given form. This is lives in a separate function from og_form_alter() so it can be shared by other OG contrib modules.

... See full list

File

./og.module, line 1969

Code

function og_all_groups_options() {
  list($types, $in) = og_get_sql_args();
  $sql = "SELECT n.title, n.nid FROM {node} n WHERE n.type {$in} AND n.status = 1 ORDER BY n.title ASC";
  $result = db_query($sql, $types);
  while ($row = db_fetch_object($result)) {
    $options[$row->nid] = $row->title;
  }
  return isset($options) ? $options : array();
}