Skip to content
Permalink
Browse files

hide coordinate historiy of quiz and safari caches; updates #958

  • Loading branch information...
following5 committed Sep 4, 2017
1 parent ffce1e2 commit 1add3fd7587805f60225f8ef7cecf5dc4a2c90d8
Showing with 18 additions and 6 deletions.
  1. +18 −6 htdocs/lib2/logic/cache.class.php
@@ -456,14 +456,26 @@ public static function getLogsArray($cacheId, $start, $count, $deleted = false,
return [];
}
$rsCoords = sql(
"SELECT `date_created` `date`, `latitude`, `longitude`
FROM `cache_coordinates`
WHERE `cache_id`='&1'
ORDER BY `date_created` DESC",
$is_quiz_or_safari = sql_value(
"SELECT `type`=7 OR `type`=8 OR `attrib_id` IS NOT NULL
FROM `caches`
LEFT JOIN `caches_attributes` `ca` ON `ca`.`cache_id`=`caches`.`cache_id` AND `attrib_id`=61
WHERE `caches`.`cache_id`='&1'",
0,
$cacheId
);
$coords = sql_fetch_assoc_table($rsCoords);
if ($is_quiz_or_safari) {
$coords = [];
} else {
$rsCoords = sql(
"SELECT `date_created` `date`, `latitude`, `longitude`
FROM `cache_coordinates`
WHERE `cache_id`='&1'
ORDER BY `date_created` DESC",
$cacheId
);
$coords = sql_fetch_assoc_table($rsCoords);
}
if ($coords) {
$lastcoorddate = $coords[count($coords)-1]['date'];

0 comments on commit 1add3fd

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