You are here

function drupal_commons_config_views in Drupal Commons 6.2

Same name and namespace in other branches
  1. 6 drupal_commons.profile \drupal_commons_config_views()

Configure views

Disable unneeded views to avoid confusion This is helpful because we've cloned many OG views

1 string reference to 'drupal_commons_config_views'
drupal_commons_profile_tasks in ./drupal_commons.profile
Perform any final installation tasks for this profile.

File

./drupal_commons.profile, line 367

Code

function drupal_commons_config_views() {

  // First fetch any disabled views, just in case
  $disabled = variable_get('views_defaults', array());

  // Now add the views we want to disable
  $disabled['og'] = TRUE;
  $disabled['og_members_block'] = TRUE;
  $disabled['og_my'] = TRUE;

  // Disable views and update the cache
  variable_set('views_defaults', $disabled);
  views_invalidate_cache();
}