Skip to content

Commit 543256e

Browse files
committed
Fix for #87: gpx files should be .gpx$
The osm_get_gps function generates a sql query which retrieves all files containing "gpx". Instead it should retrieves files with a filename ending with ".gpx". Otherwise the map won't display anything because of a JS error "TypeError: omnivore.png is not a function" (in the case of a png file).
1 parent 0e8e374 commit 543256e

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

include/functions_map.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ function osm_get_gps($page)
9292
/* Get all GPX tracks */
9393
$query="SELECT i.path FROM ".IMAGES_TABLE." AS i
9494
INNER JOIN (".IMAGE_CATEGORY_TABLE." AS ic ".$INNER_JOIN.") ON i.id = ic.image_id
95-
WHERE ".$LIMIT_SEARCH." `path` LIKE '%gpx%' ".$forbidden." ";
95+
WHERE ".$LIMIT_SEARCH." `path` LIKE '%.gpx' ".$forbidden." ";
9696

9797
return array_from_query($query, 'path');
9898
}

0 commit comments

Comments
 (0)