diff -rupN location/location.module location_new/location.module
--- location/location.module	2009-04-18 05:12:54.000000000 +1000
+++ location.module	2009-07-20 12:20:40.000000000 +1000
@@ -1415,15 +1415,16 @@ function location_token_list($type = 'al
  * Implementation of hook_search().
  * Implemented on behalf of location_search.module to make the urls not suck.
  */
-function location_search($op = 'search', $keys = null) {
-  if (module_exists('location_search')) {
+if (module_exists('location_search')) {
+  function location_search($op = 'search', $keys = null) {
     return _location_search($op, $keys);
-  }
-  // When search.module asks for name, return FALSE to tell it that we're disabled.
-  if ($op == 'name') {
-    return FALSE;
+    // When search.module asks for name, return FALSE to tell it that we're disabled.
+    if ($op == 'name') {
+      return FALSE;
+    }
   }
 }
+
 /**
  * Theme preprocess function for a location.
  */
