You are here

function og_handler_filter_public in Organic groups 5.7

Same name and namespace in other branches
  1. 5.8 og_views.inc \og_handler_filter_public()
  2. 5 og_views.inc \og_handler_filter_public()
  3. 5.3 og_views.inc \og_handler_filter_public()
1 string reference to 'og_handler_filter_public'
og_views_tables in ./og_views.inc
Implementation of the hook_views_tables()

File

./og_views.inc, line 1321

Code

function og_handler_filter_public($op, $filter, $filterinfo, &$query) {
  $query
    ->ensure_table('og_ancestry');
  if ($filter['value']) {
    $query
      ->add_where('(og_ancestry.is_public IS NULL OR og_ancestry.is_public = 1)');
  }
  else {
    $query
      ->add_where('og_ancestry.is_public = 0');
  }
}