PreorderApi/submit: ignoring unit_string if the specific fields were provided
This commit is contained in:
@@ -311,6 +311,13 @@ class PreorderApicontroller extends mfBaseApicontroller {
|
||||
$unit_search[$key] = trim($this->post['address']->$key);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// ignore unit_string if the specific fields were provided
|
||||
if($unit_search['block'] || $unit_search['stiege'] || $unit_search['stock'] || $unit_search['tuer']) {
|
||||
unset($unit_search['unit_string']);
|
||||
}
|
||||
|
||||
if($zusatz) {
|
||||
$unit_search['zusatz'] = $zusatz;
|
||||
}
|
||||
@@ -592,6 +599,7 @@ class PreorderApicontroller extends mfBaseApicontroller {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// get units excluding unavailable units
|
||||
$where = "hausnummer_id=".$address->hausnummer_id;
|
||||
$where .= " AND ( block = '' OR block IS NULL)";
|
||||
|
||||
Reference in New Issue
Block a user