Skip to content

Commit 7d6e54e

Browse files
committed
Merge pull request #85 from ThomasDaheim/Fix-for-#74
Fix for #74
2 parents dfccf4c + aa71f7f commit 7d6e54e

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

include/functions_map.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -186,6 +186,7 @@ function osm_get_items($page)
186186
// SUBSTRING_INDEX(TRIM(LEADING '.' FROM `path`), '.', 1) full path without filename extension
187187
// SUBSTRING_INDEX(TRIM(LEADING '.' FROM `path`), '.', -1) full path with only filename extension
188188

189+
// Fix for issue #74: i.storage_category_id might be in the list of $forbidden categories, use ic.category_id instead
189190
$query="SELECT i.latitude, i.longitude,
190191
IFNULL(i.name, '') AS `name`,
191192
IF(i.representative_ext IS NULL,
@@ -201,7 +202,7 @@ function osm_get_items($page)
201202
)
202203
)
203204
) AS `pathurl`,
204-
TRIM(TRAILING '/' FROM CONCAT( i.id, '/category/', IFNULL(i.storage_category_id, '') ) ) AS `imgurl`,
205+
TRIM(TRAILING '/' FROM CONCAT( i.id, '/category/', IFNULL(ic.category_id, '') ) ) AS `imgurl`,
205206
IFNULL(i.comment, '') AS `comment`,
206207
IFNULL(i.author, '') AS `author`,
207208
i.width

0 commit comments

Comments
 (0)