results are not sorted by distance from search point in a proximity search.
From: location_search.module lines 128 - 140
if (empty($keys)) {
// Non-fulltext search. We will be skipping the built-in logic.
$add = '';
if ($proximity) {
$add = ', '. earth_distance_sql($lon, $lat, 'l') .' AS distance';
}
$query = "SELECT l.lid$add FROM {location} l WHERE $conditions1";
$countquery = "SELECT COUNT(*) FROM {location} l WHERE $conditions1";
$result = pager_query($query, 10, 0, $countquery, $arguments1);
while ($row = db_fetch_object($result)) {
$lids[] = $row->lid;
}
}
I think line 124 should be
$query = "SELECT l.lid$add FROM {location} l WHERE $conditions1 $sort_parameters";
otherwise the query isn't sorted.
Thanks,
Eric
Comments
Comment #1
legolasboClosing old D6 issues as D6 is end of life