| 1 |
<?php |
<?php |
| 2 |
// $Id$ |
// $Id: location_handler_filter_location_province.inc,v 1.2 2009/01/14 16:47:39 bdragon Exp $ |
| 3 |
|
|
| 4 |
/** |
/** |
| 5 |
* Filter on province. |
* Filter on province. |
| 67 |
} |
} |
| 68 |
|
|
| 69 |
function grovel_country() { |
function grovel_country() { |
| 70 |
$country = variable_get('location_default_country', 'us'); |
$country = variable_get('site_default_country', 'us'); |
| 71 |
if (!empty($this->view->filter)) |
if (!empty($this->view->filter)) |
| 72 |
foreach ($this->view->filter as $k => $v) { |
foreach ($this->view->filter as $k => $v) { |
| 73 |
if ($v->table == 'location' && $v->field == 'country' && $v->options['relationship'] == $this->options['relationship']) { |
if ($v->table == 'location' && $v->field == 'country' && $v->options['relationship'] == $this->options['relationship']) { |
| 82 |
} |
} |
| 83 |
if ($country == '' || $country == 'All' || $country == ' ' || $country == 'xx') { |
if ($country == '' || $country == 'All' || $country == ' ' || $country == 'xx') { |
| 84 |
// It's set to something nonsensical, reset to the default to prevent malfunctions. |
// It's set to something nonsensical, reset to the default to prevent malfunctions. |
| 85 |
$country = variable_get('location_default_country', 'us'); |
$country = variable_get('site_default_country', 'us'); |
| 86 |
} |
} |
| 87 |
$this->location_country = $country; |
$this->location_country = $country; |
| 88 |
return $country; |
return $country; |