Fixed Address Filter
This commit is contained in:
@@ -410,10 +410,8 @@ class ConstructionConsent extends mfBaseModel {
|
||||
ELSE 'blue'
|
||||
END AS status_light
|
||||
FROM ConstructionConsent
|
||||
LEFT JOIN ConstructionConsentOwner cwo
|
||||
ON ConstructionConsent.id = cwo.constructionconsent_id
|
||||
LEFT JOIN addressdb.view_hausnummer vh
|
||||
ON ConstructionConsent.adb_hausnummer_id = vh.hausnummer_id
|
||||
LEFT JOIN ConstructionConsentOwner cwo ON ConstructionConsent.id = cwo.constructionconsent_id
|
||||
LEFT JOIN addressdb.view_hausnummer vh ON ConstructionConsent.adb_hausnummer_id = vh.hausnummer_id
|
||||
WHERE $where
|
||||
GROUP BY ConstructionConsent.id
|
||||
$having
|
||||
@@ -490,6 +488,13 @@ class ConstructionConsent extends mfBaseModel {
|
||||
}
|
||||
}
|
||||
|
||||
if(array_key_exists("address", $filter)) {
|
||||
$address = FronkDB::singleton()->escape($filter["address"]);
|
||||
if($address) {
|
||||
$where .= " AND (vh.strasse LIKE '%$address%' OR vh.hausnummer LIKE '%$address%' OR vh.plz LIKE '%$address%' OR vh.ortschaft LIKE '%$address%' OR vh.gemeinde LIKE '%$address%')";
|
||||
}
|
||||
}
|
||||
|
||||
if(array_key_exists("status", $filter)) {
|
||||
$status = FronkDB::singleton()->escape($filter["status"]);
|
||||
if($status) {
|
||||
|
||||
Reference in New Issue
Block a user