You are here

function location_views_views_pre_view in Location 5

Implementation of views_pre_view

File

contrib/location_views/location_views.module, line 1045
Views-enables the location module.

Code

function location_views_views_pre_view($view, $items) {

  // the map form gets cached in the views table cache
  // get location_views_map_input_form() to regenerate itself by clearing the cache
  // and recalling the form
  foreach ($view->filter as $key => $filter) {
    if ($filter['field'] == 'location.proximity_map' || $filter['field'] == 'user_location.proximity_map') {
      cache_clear_all('views_tables', true);
      $view->filter[$key]['value'] = location_views_map_input_form();
    }
  }
}