Skip to content

Commit e30005d

Browse files
authored
Image url links to tags page
When OSWORLDMAP is open on section tags, image link have to lead to image page within tags. Default behaviour is to lead to image within category
1 parent b053a67 commit e30005d

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

include/functions_map.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,7 @@ function osm_get_items($page)
102102
// Limit search by category, by tag, by smartalbum
103103
$LIMIT_SEARCH="";
104104
$INNER_JOIN="";
105+
$IMG_URL = "TRIM(TRAILING '/' FROM CONCAT( i.id, '/category/', IFNULL(ic.category_id, '') ) )";
105106
if (isset($page['section']))
106107
{
107108
if ($page['section'] === 'categories' and isset($page['category']) and isset($page['category']['id']) )
@@ -116,6 +117,7 @@ function osm_get_items($page)
116117
{
117118
$LIMIT_SEARCH = "ic.image_id IN (".implode(',', $items).") AND ";
118119
}
120+
$IMG_URL = "CONCAT( i.id, '".make_section_in_url($page)."' )";
119121
}
120122
if ($page['section'] === 'tags' and isset($page['category']) and isset($page['category']['id']) )
121123
{
@@ -207,7 +209,7 @@ function osm_get_items($page)
207209
)
208210
)
209211
)) AS `pathurl`,
210-
TRIM(TRAILING '/' FROM CONCAT( i.id, '/category/', IFNULL(ic.category_id, '') ) ) AS `imgurl`,
212+
".$IMG_URL." AS `imgurl`,
211213
IFNULL(i.comment, '') AS `comment`,
212214
IFNULL(i.author, '') AS `author`,
213215
i.width

0 commit comments

Comments
 (0)