mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-07-29 08:45:12 +02:00
Fixed tags in alert list
This commit is contained in:
parent
4b9dd69a0f
commit
25bed4d5c2
@ -975,10 +975,11 @@ function tags_has_user_acl_tags($id_user = false) {
|
|||||||
*
|
*
|
||||||
* @param string ID of the user (with false the user will be taked from config)
|
* @param string ID of the user (with false the user will be taked from config)
|
||||||
* @param string Access flag where check what tags have the user
|
* @param string Access flag where check what tags have the user
|
||||||
|
* @param bool returns 0 if the user has all the tags
|
||||||
*
|
*
|
||||||
* @return string SQL condition for tagente_module
|
* @return string SQL condition for tagente_module
|
||||||
*/
|
*/
|
||||||
function tags_get_user_tags($id_user = false, $access = 'AR') {
|
function tags_get_user_tags($id_user = false, $access = 'AR', $return_tag_any = false) {
|
||||||
global $config;
|
global $config;
|
||||||
|
|
||||||
//users_is_strict_acl
|
//users_is_strict_acl
|
||||||
@ -1036,9 +1037,13 @@ function tags_get_user_tags($id_user = false, $access = 'AR') {
|
|||||||
return array();
|
return array();
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
if($return_tag_any) {
|
||||||
|
return 0;
|
||||||
|
} else {
|
||||||
return $all_tags;
|
return $all_tags;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Get the tags of the required access flag for each group
|
// Get the tags of the required access flag for each group
|
||||||
$tags = tags_get_acl_tags($id_user, 0, $access, 'data');
|
$tags = tags_get_acl_tags($id_user, 0, $access, 'data');
|
||||||
|
@ -46,7 +46,11 @@ $offset_simple = (int) get_parameter_get ("offset_simple", 0);
|
|||||||
$id_group = (int) get_parameter ("ag_group", 0); //0 is the All group (selects all groups)
|
$id_group = (int) get_parameter ("ag_group", 0); //0 is the All group (selects all groups)
|
||||||
$free_search = get_parameter("free_search", '');
|
$free_search = get_parameter("free_search", '');
|
||||||
|
|
||||||
$user_tag_array = array_values(array_keys(tags_get_user_tags($config['id_user'])));
|
$user_tag_array = tags_get_user_tags($config['id_user'],'AR', true);
|
||||||
|
|
||||||
|
if ($user_tag_array) {
|
||||||
|
$user_tag_array = array_values(array_keys($user_tag_array));
|
||||||
|
|
||||||
$user_tag = '';
|
$user_tag = '';
|
||||||
|
|
||||||
foreach ($user_tag_array as $key => $value) {
|
foreach ($user_tag_array as $key => $value) {
|
||||||
@ -69,7 +73,10 @@ foreach ($tag_param_validate as $key => $value) {
|
|||||||
require ("general/noaccess.php");
|
require ("general/noaccess.php");
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
} else {
|
||||||
|
$tag_filter = get_parameter("tag_filter", 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($tag_filter) {
|
if ($tag_filter) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user