/[drupal]/contributions/modules/location/handlers/location_handler_filter_location_province.inc
ViewVC logotype

Diff of /contributions/modules/location/handlers/location_handler_filter_location_province.inc

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph | View Patch Patch

revision 1.2, Wed Jan 14 16:47:39 2009 UTC revision 1.3, Mon Aug 31 22:09:35 2009 UTC
# Line 1  Line 1 
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.
# Line 67  class location_handler_filter_location_p Line 67  class location_handler_filter_location_p
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']) {
# Line 82  class location_handler_filter_location_p Line 82  class location_handler_filter_location_p
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;

Legend:
Removed from v.1.2  
changed lines
  Added in v.1.3

  ViewVC Help
Powered by ViewVC 1.1.2