Various Bugfixes
This commit is contained in:
@@ -109,7 +109,8 @@ class BuildingModel {
|
||||
LEFT JOIN Buildingstatus ON (Buildingstatus.id = Building.status_id)
|
||||
WHERE $where
|
||||
ORDER BY network_id, pop_id, street, zip, city";
|
||||
|
||||
|
||||
mfLoghandler::singleton()->debug($sql);
|
||||
if(is_array($limit) && count($limit)) {
|
||||
if(is_numeric($limit['start']) && is_numeric($limit['count'])) {
|
||||
$sql .= " LIMIT ".$limit['start'].", ".$limit['count'];
|
||||
@@ -215,6 +216,13 @@ class BuildingModel {
|
||||
}
|
||||
}
|
||||
|
||||
if(array_key_exists("=street", $filter)) {
|
||||
$street = FronkDB::singleton()->escape($filter["=street"]);
|
||||
if($street) {
|
||||
$where .= " AND street like '$street'";
|
||||
}
|
||||
}
|
||||
|
||||
if(array_key_exists("zip", $filter)) {
|
||||
$zip = FronkDB::singleton()->escape($filter["zip"]);
|
||||
if($zip) {
|
||||
@@ -222,6 +230,13 @@ class BuildingModel {
|
||||
}
|
||||
}
|
||||
|
||||
if(array_key_exists("=zip", $filter)) {
|
||||
$zip = FronkDB::singleton()->escape($filter["=zip"]);
|
||||
if($zip) {
|
||||
$where .= " AND zip like '$zip'";
|
||||
}
|
||||
}
|
||||
|
||||
if(array_key_exists("city", $filter)) {
|
||||
$city = FronkDB::singleton()->escape($filter["city"]);
|
||||
if($city) {
|
||||
@@ -229,6 +244,13 @@ class BuildingModel {
|
||||
}
|
||||
}
|
||||
|
||||
if(array_key_exists("=city", $filter)) {
|
||||
$city = FronkDB::singleton()->escape($filter["=city"]);
|
||||
if($city) {
|
||||
$where .= " AND city like '$city'";
|
||||
}
|
||||
}
|
||||
|
||||
//var_dump($filter, $where);exit;
|
||||
return $where;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user