piwik/piwik — pull request #316 by brianmcardle (2014-06-13 09:21:38+00:00)
Title: Added IPv6 support for GeoIP location, while still retaining IPv4 functi...

IPv4 tracking depends on:
- GEOIP_ADDR
- GEOIP_CONTINENT_CODE
- GEOIP_COUNTRY_CODE
- GEOIP_COUNTRY_NAME

And IPv6 depends on:
GEOIP_ADDR
GEOIP_CONTINENT_CODE_V6
GEOIP_COUNTRY_CODE_V6
GEOIP_COUNTRY_NAME_V6

For the isAvailable() and isWorking() functions, added checks to see if the GEOIP_COUNTRY_CODE_V6 variable has been populated.

For getLocation, if each IPv4 variable is empty, check if the IPv6 equivalent is empty. If not, use the IPv6 equivalent instead.