Merge branch '1389-Filtro-de-Tags-dev' into 'develop'
Fixed search by tags See merge request !912
This commit is contained in:
commit
9181d1ca16
|
@ -234,8 +234,12 @@ if (!empty($tag_with)) {
|
|||
$first = true;
|
||||
$filter_resume['tag_inc'] = $tag_with;
|
||||
foreach ($tag_with as $id_tag) {
|
||||
if ($first) $first = false;
|
||||
else $sql_post .= " AND ";
|
||||
if ($first){
|
||||
$sql_post .= " ( ";
|
||||
$first = false;
|
||||
} else {
|
||||
$sql_post .= " AND ( ";
|
||||
}
|
||||
$sql_post .= "tags LIKE '" . tags_get_name($id_tag) . "'";
|
||||
$sql_post .= " OR ";
|
||||
$sql_post .= "tags LIKE '" . tags_get_name($id_tag) . ",%'";
|
||||
|
@ -243,6 +247,7 @@ if (!empty($tag_with)) {
|
|||
$sql_post .= "tags LIKE '%," . tags_get_name($id_tag) . "'";
|
||||
$sql_post .= " OR ";
|
||||
$sql_post .= "tags LIKE '%," . tags_get_name($id_tag) . ",%'";
|
||||
$sql_post .= ' ) ';
|
||||
}
|
||||
$sql_post .= ' ) ';
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue