Skip to content
Permalink
Browse files

#1049 - fix sorting issue with guest users caused of not existing hom…

…ecoords record
  • Loading branch information...
teiling88 committed May 28, 2017
1 parent 07a26db commit 5a2ee0238e5460ff919baf20a9d53fc742e65dec
Showing with 2 additions and 2 deletions.
  1. +2 −2 htdocs/search.php
@@ -470,7 +470,7 @@
// For non-distance-based searches, sort by name instead of distance if
// no reference coords exist.
if (!isset($options['lat']) || !isset($options['lon']) || $options['lat'] + $options['lon'] == 0) {
if (!$homecoords) {
if (!$homecoords && !$options['sort']) {
$options['sort'] = 'byname';
}
}
@@ -487,7 +487,6 @@
$options['creationdate'] = $_REQUEST['creationdate'];
}
//=========================================================
// 3. query caching
//=========================================================
@@ -557,6 +556,7 @@
if (!isset($options['showresult'])) {
$options['showresult'] = 0;
}
if ($options['showresult'] == 1) {
//===============================================================
// X5. build basic SQL statement depends on search type

0 comments on commit 5a2ee02

Please sign in to comment.
You can’t perform that action at this time.