Index: location.module
===================================================================
--- location.module	(revision 295)
+++ location.module	(working copy)
@@ -21,8 +21,10 @@
 function location_menu($may_cache = FALSE) {
   $items = array();
   if ($may_cache) {
-    //$items[] = array('path' => 'search/location', 'title' => t('by location'), 'callback' => 'location_search_form_page', 'access' => user_access('search content'), 'type' => MENU_LOCAL_TASK, 'weight' => 9);
-    $items[] = array('path' => 'search/location', 'title' => t('by location'), 'callback' => 'location_search_view', 'access' => user_access('search content'), 'type' => MENU_LOCAL_TASK, 'weight' => 9);
+    if (variable_get('location_search_enable', 1)) {
+      //$items[] = array('path' => 'search/location', 'title' => t('by location'), 'callback' => 'location_search_form_page', 'access' => user_access('search content'), 'type' => MENU_LOCAL_TASK, 'weight' => 9);
+      $items[] = array('path' => 'search/location', 'title' => t('by location'), 'callback' => 'location_search_view', 'access' => user_access('search content'), 'type' => MENU_LOCAL_TASK, 'weight' => 9);
+    }
     $items[] = array('path' => 'admin/settings/location', 'title' => t('location'), 'callback' => 'location_configure');
     $items[] = array('path' => 'admin/settings/location/main', 'title' => t('main settings'), 'type' => MENU_DEFAULT_LOCAL_TASK);
     $items[] = array('path' => 'admin/settings/location/maplinking', 'title' => t('map links'), 'callback' => 'location_map_link_options_page', 'access' => user_access('administer site configuration'), 'type' => MENU_LOCAL_TASK, 'weight' => 1);
@@ -929,6 +931,12 @@
       '#default_value' => variable_get('location_suppress_country', 0),
       '#description' => t('If your site is specific to a country and you would like to hide the country field on search forms and content creation forms, check this box.  Doing so will automatically assume the country to be the country you have chosen for the \'default country selection\' above.')
       );
+  $form['location_search_enable'] = array(
+      '#type' => 'checkbox',
+      '#title' => t('Enable search by location'),
+      '#default_value' => variable_get('location_search_enable', 1),
+      '#description' => t('Check this to enable the "by location" tab on the search page.')
+      );
   $form['location_search_distance_unit'] = array(
       '#type' => 'radios',
       '#title' => t('Distance unit for location-based searches'),
@@ -974,7 +982,7 @@
       '#title' => t('Enable all <em>available</em> features for locations from the following countries'),
       '#default_value' => location_get_configured_countries(),
       '#options' => $supported_countries,
-      '#description' => t('Currently, your CivicSpace site is capable of supporting extra features (e.g., postal code proximity searches) for locations from this list of countries.  Please narrow the list down to countries for which you want to support these extra features.  It may be useful for performance to narrow down this list if most the locations in your system are from only a handful of the listed countries.')
+      '#description' => t('Currently, your site is capable of supporting extra features (e.g., postal code proximity searches) for locations from this list of countries.  Please narrow the list down to countries for which you want to support these extra features.  It may be useful for performance to narrow down this list if most the locations in your system are from only a handful of the listed countries.')
       );
 
   return system_settings_form('location_configure_settings', $form);
