Piwik\Plugins\UserCountry\LocationProvider\GeoIp::fixupLocation PHP Method

fixupLocation() protected method

Fix up data to work with our SVG maps which include 'Tib' boundaries
protected fixupLocation ( &$location )
    protected function fixupLocation(&$location)
    {
        if (!empty($location[self::REGION_CODE_KEY]) && $location[self::REGION_CODE_KEY] == '14' && !empty($location[self::COUNTRY_CODE_KEY]) && strtoupper($location[self::COUNTRY_CODE_KEY]) == 'CN') {
            $location[self::COUNTRY_CODE_KEY] = 'ti';
            $location[self::REGION_CODE_KEY] = '1';
        }
    }