Rimo Import: Now trimming certain stringified control characters from strings
This commit is contained in:
@@ -135,8 +135,8 @@ class AddressHelper
|
||||
}
|
||||
|
||||
|
||||
$name = trim($building->name);
|
||||
$strasse_hausnummer = trim($building->address->name);
|
||||
$name = $this->trimExtra($building->name);
|
||||
$strasse_hausnummer = trim($this->trimExtra($building->address->name));
|
||||
$split_result = $this->splitStreetHausnummer($strasse_hausnummer);
|
||||
|
||||
if (!$split_result) {
|
||||
@@ -148,18 +148,18 @@ class AddressHelper
|
||||
$hausnummer_name = $this->db->escape($split_result[1]);
|
||||
$addresszusatz = $this->db->escape($split_result[2]);
|
||||
|
||||
$gem_kz = $this->db->escape(trim($building->municipality->name));
|
||||
$gem_name = $this->db->escape(trim($building->municipality->userLabel));
|
||||
$gem_kz = $this->db->escape($this->trimExtra($building->municipality->name));
|
||||
$gem_name = $this->db->escape($this->trimExtra($building->municipality->userLabel));
|
||||
|
||||
$ort_name = $this->db->escape(trim($building->address->city));
|
||||
$plz_name = $this->db->escape(trim($building->address->zipCode));
|
||||
$ort_name = $this->db->escape($this->trimExtra($building->address->city));
|
||||
$plz_name = $this->db->escape($this->trimExtra($building->address->zipCode));
|
||||
|
||||
$lat = ($building->address->latitude) ? $this->truncateFloat($building->address->latitude, 14) : null;
|
||||
$long = ($building->address->longitude) ? $this->truncateFloat($building->address->longitude, 14) : null;
|
||||
//$lat = $building->address->latitude;
|
||||
//$long = $building->address->longitude;
|
||||
$unit_count = $building->homesCount;
|
||||
$lot_num = $building->address->lotNumber;
|
||||
$lot_num = $this->trimExtra($building->address->lotNumber);
|
||||
$fcp_name = false;
|
||||
|
||||
$adrcd = false;
|
||||
@@ -551,4 +551,7 @@ class AddressHelper
|
||||
echo $logtext . "\n";
|
||||
}
|
||||
|
||||
public function trimExtra($string) {
|
||||
return preg_replace(['/\\\r+/', '/\\\n+/', '/\\\t+/'], "", trim($string));
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user