}
$sSQL = 'SELECT *,';
- $sSQL .= ' get_name_by_language(name,'.$mLangPref.') as localname';
+ $sSQL .= ' get_name_by_language(name,'.$mLangPref.') as localname';
$sSQL .= ' FROM get_addressdata('.$iPlaceID.','.$sHousenumber.')';
- $sSQL .= ' ORDER BY rank_address desc,isaddress DESC';
+ $sSQL .= ' ORDER BY rank_address DESC, isaddress DESC';
$this->aAddressLines = chksql($oDB->getAll($sSQL));
}
return $this->aAddressLines;
}
- return array_filter($this->aAddressLines, 'AddressDetails::isAddress');
+ return array_filter($this->aAddressLines, array(__CLASS__, 'isAddress'));
}
public function getLocaleAddress()
public function getAdminLevels()
{
$aAddress = array();
- foreach ($this->aAddressLines as $aLine) {
+ foreach (array_reverse($this->aAddressLines) as $aLine) {
if (self::isAddress($aLine)
&& isset($aLine['admin_level'])
&& $aLine['admin_level'] < 15