quick fix for pad.ma statistics

This commit is contained in:
rolux 2012-03-26 10:55:49 +00:00
parent 5a47388d64
commit 2298121c4b

View file

@ -147,7 +147,7 @@ pandora.ui.statisticsDialog = function() {
country = split[1]; country = split[1];
city = split[0]; city = split[0];
} }
countryData = Ox.getCountryByName(country) || {continent: '', region: ''}; countryData = Ox.getCountryByName(country);
continent = countryData.continent; continent = countryData.continent;
region = [continent, countryData.region].join(', '); region = [continent, countryData.region].join(', ');
country = [region, country].join(', ') country = [region, country].join(', ')
@ -221,7 +221,7 @@ pandora.ui.statisticsDialog = function() {
Ox.forEach(data[mode].country, function(countryValue, countryKey) { Ox.forEach(data[mode].country, function(countryValue, countryKey) {
countryKey = countryKey.split(', ').pop(); countryKey = countryKey.split(', ').pop();
if ( if (
Ox.getCountryByName(countryKey)[key] == regionKey (Ox.getCountryByName(countryKey) || {})[key] == regionKey
&& countryValue > max && countryValue > max
) { ) {
flagCountry[mode][key][regionKey] = countryKey; flagCountry[mode][key][regionKey] = countryKey;