mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-07-31 01:35:36 +02:00
Fixed bug #2007
This commit is contained in:
parent
cb845a0a9b
commit
819ee73a28
@ -755,7 +755,7 @@ function tags_get_acl_tags_module_condition($acltags, $modules_table = '') {
|
|||||||
* @return string SQL condition for tagente_module
|
* @return string SQL condition for tagente_module
|
||||||
*/
|
*/
|
||||||
|
|
||||||
function tags_get_acl_tags_event_condition($acltags, $meta = false, $force_group_and_tag = false) {
|
function tags_get_acl_tags_event_condition($acltags, $meta = false, $force_group_and_tag = false, $force_equal = false) {
|
||||||
|
|
||||||
global $config;
|
global $config;
|
||||||
$condition = '';
|
$condition = '';
|
||||||
@ -800,8 +800,11 @@ function tags_get_acl_tags_event_condition($acltags, $meta = false, $force_group
|
|||||||
|
|
||||||
if ($force_group_and_tag) {
|
if ($force_group_and_tag) {
|
||||||
if (!empty($all_tags[$tag])) {
|
if (!empty($all_tags[$tag])) {
|
||||||
//~ $tags_condition .= sprintf('(tags = "%s"',io_safe_input($all_tags[$tag]));
|
if ($force_equal) {
|
||||||
|
$tags_condition .= sprintf('(tags = "%s"',io_safe_input($all_tags[$tag]));
|
||||||
|
} else {
|
||||||
$tags_condition .= "(tags LIKE '%".io_safe_input($all_tags[$tag])."%'";
|
$tags_condition .= "(tags LIKE '%".io_safe_input($all_tags[$tag])."%'";
|
||||||
|
}
|
||||||
$childrens = groups_get_childrens($group_id, null, true);
|
$childrens = groups_get_childrens($group_id, null, true);
|
||||||
|
|
||||||
if (empty($childrens)) {
|
if (empty($childrens)) {
|
||||||
@ -819,11 +822,14 @@ function tags_get_acl_tags_event_condition($acltags, $meta = false, $force_group
|
|||||||
$tags_condition .= "id_grupo = ".$group_id;
|
$tags_condition .= "id_grupo = ".$group_id;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
//~ $tags_condition .= sprintf('tags = "%s"',io_safe_input($all_tags[$tag]));
|
if ($force_equal) {
|
||||||
|
$tags_condition .= sprintf('tags = "%s"',io_safe_input($all_tags[$tag]));
|
||||||
|
} else {
|
||||||
$tags_condition .= "tags LIKE '%".io_safe_input($all_tags[$tag])."%'";
|
$tags_condition .= "tags LIKE '%".io_safe_input($all_tags[$tag])."%'";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// If there is not tag condition ignore
|
// If there is not tag condition ignore
|
||||||
if (empty($tags_condition)) {
|
if (empty($tags_condition)) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user