Removed wildcards '%' from querys where its filtered by tag. Ticket #1363.
This commit is contained in:
parent
304e4be112
commit
b02e994701
|
@ -4755,7 +4755,7 @@ function otherParameter2Filter($other, $return_as_array = false) {
|
|||
$filter['tag'] = $other['data'][14];
|
||||
}
|
||||
else {
|
||||
$filterString .= " AND tags LIKE '%" . $other['data'][14]."%'";
|
||||
$filterString .= " AND tags LIKE '" . $other['data'][14]."'";
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -5667,7 +5667,7 @@ function get_events_with_user($trash1, $trash2, $other, $returnType, $user_in_db
|
|||
|
||||
//Search by tag
|
||||
if ($tag != "") {
|
||||
$sql_post .= " AND tags LIKE '%" . io_safe_input($tag) . "%'";
|
||||
$sql_post .= " AND tags LIKE '" . io_safe_input($tag) . "'";
|
||||
}
|
||||
|
||||
//Inject the raw sql
|
||||
|
|
|
@ -867,7 +867,7 @@ function tags_get_acl_tags_event_condition($acltags) {
|
|||
//~ $tags_condition .= sprintf(' OR tags LIKE "%s %%"',io_safe_input($all_tags[$tag]));
|
||||
//~ $tags_condition .= sprintf(' OR tags LIKE "%%,%s %%"',io_safe_input($all_tags[$tag]));
|
||||
|
||||
$tags_condition .= sprintf('tags LIKE "%%%s%%"',io_safe_input($all_tags[$tag]));
|
||||
$tags_condition .= sprintf('tags LIKE "%s"',io_safe_input($all_tags[$tag]));
|
||||
}
|
||||
|
||||
// If there is not tag condition ignore
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -187,7 +187,7 @@ if (!empty($tag_with)) {
|
|||
foreach ($tag_with as $id_tag) {
|
||||
if ($first) $first = false;
|
||||
else $sql_post .= " OR ";
|
||||
$sql_post .= "tags LIKE '%" . tags_get_name($id_tag) . "%'";
|
||||
$sql_post .= "tags LIKE '" . tags_get_name($id_tag) . "'";
|
||||
}
|
||||
$sql_post .= ' ) ';
|
||||
}
|
||||
|
@ -198,7 +198,7 @@ if (!empty($tag_without)) {
|
|||
if ($first) $first = false;
|
||||
else $sql_post .= " AND ";
|
||||
|
||||
$sql_post .= "tags NOT LIKE '%" . tags_get_name($id_tag) . "%'";
|
||||
$sql_post .= "tags NOT LIKE '" . tags_get_name($id_tag) . "'";
|
||||
}
|
||||
$sql_post .= ' ) ';
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue