Piwigo / piwigo-openstreetmap

OpenStreetMap integration for Piwigo
http://piwigo.org/ext/extension_view.php?eid=701
GNU General Public License v3.0
35 stars 35 forks source link

gpx files should be .gpx$ #87

Closed joubu closed 8 years ago

joubu commented 8 years ago

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).

xbgmsharp commented 8 years ago

Pull request merge. Good catch. True it should have been more specific, specially if the filename include GPX. What about uppercase filename?

joubu commented 8 years ago

Do you know what is the db collate used by piwigo? On my install it's utf8_general_ci, so the search is case insensitive.

It seems that there is another place where we should apply the same fix: admin/admin_batchmanager.php: $filter = "path LIKE '%gpx%'";

xbgmsharp commented 8 years ago

Fix and release in v2.8.a