You are here

function smartqueue_domain_views_pre_view in Smartqueue Domain 7

Implements hook_views_pre_view().

Fixes filter handler name previously misspelled as 'in_domian'.

See https://drupal.org/node/1965786#comment-7285168 (and the whole comment thread generally) for reasoning behind why this has been done this way instead of implementing hook_update_N().

See also

smartqueue_domain_views_data()

File

./smartqueue_domain.views.inc, line 30

Code

function smartqueue_domain_views_pre_view(&$view) {
  $filters = $view->display_handler
    ->get_option('filters');
  if (isset($filters['in_domian'])) {
    $filters['in_domain'] = $filters['in_domian'];
    $filters['in_domain']['id'] = 'in_domain';
    $filters['in_domain']['field'] = 'in_domain';
    unset($filters['in_domian']);
    $view->display_handler
      ->set_option('filters', $filters);
  }
}