Correct spelling errors in stop names
This commit is contained in:
parent
580e637f8a
commit
ef90fd2fca
|
@ -8,6 +8,10 @@
|
|||
protected $fullName;
|
||||
protected $location;
|
||||
|
||||
public static function sanitizeName($name) {
|
||||
return preg_replace("~(^| )'?T($| )~", '$1\'t$2', $name);
|
||||
}
|
||||
|
||||
public function __toString () {
|
||||
return 'PTStop[' . $this->ref . ']';
|
||||
}
|
||||
|
@ -41,8 +45,8 @@
|
|||
$this->exists = !is_null($response);
|
||||
|
||||
$this->municipality = $response['omschrijvingGemeente'];
|
||||
$this->name = $response['omschrijvingKort'];
|
||||
$this->fullName = $response['omschrijvingLang'];
|
||||
$this->name = static::sanitizeName($response['omschrijvingKort']);
|
||||
$this->fullName = static::sanitizeName($response['omschrijvingLang']);
|
||||
$this->location = array(floatval($response['coordinaat']['lt']), floatval($response['coordinaat']['ln']));
|
||||
|
||||
}
|
||||
|
|
|
@ -38,7 +38,7 @@
|
|||
|
||||
echo '<a href="?h=' . rawurlencode($stop['halteNummer']) . '" class="result stop">';
|
||||
|
||||
echo '<span class="name">' . $stop['omschrijvingLang'] . '</span> ';
|
||||
echo '<span class="name">' . PTStop::sanitizeName($stop['omschrijvingLang']) . '</span> ';
|
||||
echo '<span class="ref">(' . $stop['halteNummer'] . ')</span>';
|
||||
if (isset($stop['bestemmingen'][0])) {
|
||||
echo '<span class="dest"><span class="deemphasize">richting</span> ' . parent::listify($stop['bestemmingen']) . '</span>';
|
||||
|
|
Loading…
Reference in a new issue