show own unpublished caches on map

This commit is contained in:
following 2013-07-23 12:59:49 +02:00
parent 988dad23a2
commit f5dd9fc91c
2 changed files with 5 additions and 5 deletions

View File

@ -276,7 +276,7 @@ function output_cachexml($sWaypoint)
$rsCache = sql_slave("SELECT `caches`.`cache_id`, `caches`.`name`, `caches`.`wp_oc`, `caches`.`cache_id`, `caches`.`type`,
`caches`.`longitude`, `caches`.`latitude`,
IF(`caches`.`status` IN (2,3,6), 1, 0) AS `tna`,
`caches`.`status`>1 AS `inactive`,
IFNULL(`trans_status_text`.`text`, `cache_status`.`name`) AS `statustext`,
IFNULL(`trans_type_text`.`text`, `cache_type`.`name`) AS `type_text`, `cache_type`.`id` AS `type_id`,
IFNULL(`trans_size_text`.`text`, `cache_size`.`name`) AS `size`,
@ -332,7 +332,7 @@ function output_cachexml($sWaypoint)
echo 'name="' . xmlentities($rCache['name']) . '" ';
echo 'wpoc="' . xmlentities($rCache['wp_oc']) . '" ';
echo 'coords="' . $rCache['longitude'] . ',' . $rCache['latitude'] . '" ';
echo 'status_tna="' . xmlentities($rCache['tna']) . '" ';
echo 'inactive="' . xmlentities($rCache['inactive']) . '" ';
echo 'status_text="' . xmlentities($rCache['statustext']) . '" ';
echo 'type_id="' . xmlentities($rCache['type_id']) . '" ';
echo 'type_text="' . xmlentities($rCache['type_text']) . '" ';
@ -466,7 +466,7 @@ function output_searchresult($nResultId, $compact, $nLon1, $nLon2, $nLat1, $nLat
LEFT JOIN `cache_logs` `notfound_logs` ON `notfound_logs`.`cache_id`=`caches`.`cache_id` AND `notfound_logs`.`user_id`='&6' AND `notfound_logs`.`type`=2
LEFT JOIN `caches_attributes` ON `caches_attributes`.`cache_id`=`caches`.`cache_id` AND `caches_attributes`.`attrib_id`=6
WHERE `map2_data`.`result_id`='&1' AND `caches`.`longitude`>'&2' AND `caches`.`longitude`<'&3' AND `caches`.`latitude`>'&4' AND `caches`.`latitude`<'&5'
AND `caches`.`status`<>5 /* hide unpublished caches */
AND (`caches`.`status`<>5 OR `caches`.`user_id`='&6') /* hide unpublished caches */
AND `caches`.`status`<>'&7' /* ... and vandalized listings, locked duplicates etc. */
AND `caches`.`status`<>7 /* ... and locked/invisible caches */
ORDER BY `caches`.`status` DESC, `oconly` AND NOT (`found` OR `notfound`), NOT (`found` OR `notfound`), `caches`.`type`<>4, MD5(`caches`.`name`)

View File

@ -1131,7 +1131,7 @@ function parseXML_GetHTML(xmlobject)
var sName = aCaches[0].getAttribute("name");
var sWPOC = aCaches[0].getAttribute("wpoc");
var sCoords = aCaches[0].getAttribute("coords");
var bStatusTNA = aCaches[0].getAttribute("status_tna");
var bInactive = aCaches[0].getAttribute("inactive");
var sStatusText = aCaches[0].getAttribute("status_text");
var nTypeId = aCaches[0].getAttribute("type_id");
var sTypeText = aCaches[0].getAttribute("type_text");
@ -1159,7 +1159,7 @@ function parseXML_GetHTML(xmlobject)
*}
var sHtml = "<div id='mapinfowindow' class='mappopup' style='z-index:800'><table class='mappopup'>";
if (bStatusTNA == 1)
if (bInactive == 1)
sHtml += "<tr><td colspan='2'><font size='2' color='red'><b>" + xmlentities(sStatusText) + "</b></font></td></tr>";
// InfoWindows have a min width; set min width for content to avoid large right borders: