Fix filter on language
This commit is contained in:
parent
499c2ea30a
commit
949e0f2326
@ -332,7 +332,11 @@ class WebsitePage extends CommonObject
|
|||||||
if ($key == 't.rowid' || $key == 't.fk_website') {
|
if ($key == 't.rowid' || $key == 't.fk_website') {
|
||||||
$sqlwhere[] = $key.'='.$value;
|
$sqlwhere[] = $key.'='.$value;
|
||||||
} elseif ($key == 'lang' || $key == 't.lang') {
|
} elseif ($key == 'lang' || $key == 't.lang') {
|
||||||
$sqlwhere[] = $key." = '".$this->db->escape(substr($value, 0, 2))."'";
|
$listoflang = array();
|
||||||
|
foreach(explode(',', $value) as $tmpvalue) {
|
||||||
|
$listoflang[] = "'".$this->db->escape(substr(str_replace("'", '', $tmpvalue), 0, 2))."'";
|
||||||
|
}
|
||||||
|
$sqlwhere[] = $key." IN (".join(',', $listoflang).")";
|
||||||
} else {
|
} else {
|
||||||
$sqlwhere[] = $key.' LIKE \'%'.$this->db->escape($value).'%\'';
|
$sqlwhere[] = $key.' LIKE \'%'.$this->db->escape($value).'%\'';
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user