Skip to content

Commit ad6f446

Browse files
committed
Fix Permission issue
1 parent 6822bab commit ad6f446

1 file changed

Lines changed: 16 additions & 16 deletions

File tree

osmmap2.php

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,16 @@
8989
}
9090
}
9191

92+
$forbidden = get_sql_condition_FandF(
93+
array
94+
(
95+
'forbidden_categories' => 'category_id',
96+
'visible_categories' => 'category_id',
97+
'visible_images' => 'id'
98+
),
99+
"\n AND"
100+
);
101+
92102
/* We have lat and lng coordonate for virtual album */
93103
if (isset($_GET['min_lat']) and isset($_GET['max_lat']) and isset($_GET['min_lng']) and isset($_GET['max_lng']))
94104
{
@@ -118,7 +128,7 @@
118128
WHERE `latitude` IS NOT NULL AND `longitude` IS NOT NULL
119129
AND `latitude` > ".$_GET['min_lat']." AND `latitude` < ".$_GET['max_lat']."
120130
AND `longitude` > ".$_GET['min_lng']." AND `longitude` < ".$_GET['max_lng']."
121-
GROUP BY id;";
131+
".$forbidden." GROUP BY id;";
122132

123133
$items = hash_from_query( $query, 'id');
124134

@@ -134,16 +144,6 @@
134144
exit;
135145
}
136146

137-
$forbidden = get_sql_condition_FandF(
138-
array
139-
(
140-
'forbidden_categories' => 'category_id',
141-
'visible_categories' => 'category_id',
142-
'visible_images' => 'id'
143-
),
144-
"\n AND"
145-
);
146-
147147
// Fetch data with latitude and longitude
148148
//$query="SELECT `latitude`, `longitude`, `name`, `path` FROM ".IMAGES_TABLE." WHERE `latitude` IS NOT NULL AND `longitude` IS NOT NULL;";
149149
// SUBSTRING_INDEX(TRIM(LEADING '.' FROM `path`), '.', 1) full path without filename extension
@@ -325,11 +325,11 @@
325325
options: {
326326
iconUrl: ".$pinpath.",
327327
shadowUrl: ".$pinshadowpath.",
328-
iconSize: ".$pinsize.",
329-
shadowSize: ".$pinshadowsize.",
330-
iconAnchor: ".$pinoffset.",
331-
shadowAnchor: ".$pinoffset.",
332-
popupAnchor: ".$pinpopupoffset."
328+
iconSize: [".$pinsize."],
329+
shadowSize: [".$pinshadowsize."],
330+
iconAnchor: [".$pinoffset."],
331+
shadowAnchor: [".$pinoffset."],
332+
popupAnchor: [".$pinpopupoffset."]
333333
}
334334
});";
335335
}

0 commit comments

Comments
 (0)