• Модуль: sale
  • Путь к файлу: ~/bitrix/modules/sale/lib/location/geoip.php
  • Класс: BitrixSaleLocationGeoIp
  • Вызов: GeoIp::isNormalizedNamesMatched
static function isNormalizedNamesMatched($name, $country, $region, $subregion)
{
	if($name == '')
	{
		return true;
	}

	if($country == '' && $region == '' && $subregion == '')
	{
		return true;
	}

	$result = true;
	$checked = false;

	if($country !== '')
	{
		$result = $country === $name;
		$checked = true;
	}

	if((!$checked || !$result) && $region !== '')
	{
		$result = $region === $name;
		$checked = true;
	}

	if((!$checked || !$result) && $subregion !== '')
	{
		$result = $subregion === $name;
	}

	return $result;
}