Merge branch 'ent-5597-9746-primera-carga-de-filtro-no-funciona' into 'develop'
Fixed tags_without See merge request artica/pandorafms!3116
This commit is contained in:
commit
e4ea3e036b
|
@ -1083,6 +1083,19 @@ function events_get_all(
|
||||||
$tag_without = base64_decode($filter['tag_without']);
|
$tag_without = base64_decode($filter['tag_without']);
|
||||||
$tags = json_decode($tag_without, true);
|
$tags = json_decode($tag_without, true);
|
||||||
if (is_array($tags) && !in_array('0', $tags)) {
|
if (is_array($tags) && !in_array('0', $tags)) {
|
||||||
|
if (!$user_is_admin) {
|
||||||
|
$user_tags = array_flip(tags_get_tags_for_module_search());
|
||||||
|
if ($user_tags != null) {
|
||||||
|
foreach ($tags as $key_tag => $id_tag) {
|
||||||
|
// User cannot filter with those tags.
|
||||||
|
if (!array_search($id_tag, $user_tags)) {
|
||||||
|
unset($tags[$key_tag]);
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
foreach ($tags as $id_tag) {
|
foreach ($tags as $id_tag) {
|
||||||
if (!isset($tags_names[$id_tag])) {
|
if (!isset($tags_names[$id_tag])) {
|
||||||
$tags_names[$id_tag] = tags_get_name($id_tag);
|
$tags_names[$id_tag] = tags_get_name($id_tag);
|
||||||
|
|
Loading…
Reference in New Issue