Index: location/handlers/location_handler_filter_location_country.inc =================================================================== --- location/handlers/location_handler_filter_location_country.inc (revision 707) +++ location/handlers/location_handler_filter_location_country.inc (working copy) @@ -4,7 +4,8 @@ /** * Filter on country. */ -class location_handler_filter_location_country extends views_handler_filter { +//class location_handler_filter_location_country extends views_handler_filter { +class location_handler_filter_location_country extends views_handler_filter_in_operator { function option_definition() { $options = parent::option_definition(); @@ -25,6 +26,16 @@ */ function value_form(&$form, &$form_state) { $options = location_get_iso3166_list(); + + if (!empty($form_state['exposed'])) { + if (!empty($this->options['expose']['reduce'])) { + // This code was taken from modules/views/handlers/views_handler_filter_in_operator.inc + // I don't think I'm using it correctly, and perhaps instead of extending the + // views_handler_filter_in_operator, we should copy the code into this module. + $options = array_intersect_key($options, $this->value); + } + } + $form['value'] = array( '#type' => 'select', '#title' => t('Country'), Index: location/location.views.inc =================================================================== --- location/location.views.inc (revision 707) +++ location/location.views.inc (working copy) @@ -37,7 +37,8 @@ 'parent' => 'views_handler_field', ), 'location_handler_filter_location_country' => array( - 'parent' => 'views_handler_filter', + //'parent' => 'views_handler_filter', + 'parent' => 'views_handler_filter_in_operator', ), 'location_handler_argument_location_country' => array( 'parent' => 'views_handler_argument',