diff options
author | Romain d'Alverny <rda@mageia.org> | 2012-02-21 23:34:21 +0000 |
---|---|---|
committer | Romain d'Alverny <rda@mageia.org> | 2012-02-21 23:34:21 +0000 |
commit | e2df605c5959e46b53b0161c579c7fa577379114 (patch) | |
tree | 9cd88ede4edf0fdcb90ac3d8c3690be1b7213622 /lib/maxmind/geoip | |
parent | 0f0b921f2ab9a1578066d18ea9b93ee13474a0f7 (diff) | |
download | www-e2df605c5959e46b53b0161c579c7fa577379114.tar www-e2df605c5959e46b53b0161c579c7fa577379114.tar.gz www-e2df605c5959e46b53b0161c579c7fa577379114.tar.bz2 www-e2df605c5959e46b53b0161c579c7fa577379114.tar.xz www-e2df605c5959e46b53b0161c579c7fa577379114.zip |
add _lib_ prefix to geoip_* functions not to collide with loaded module
Diffstat (limited to 'lib/maxmind/geoip')
-rw-r--r-- | lib/maxmind/geoip/geoipv6.inc.php | 64 |
1 files changed, 32 insertions, 32 deletions
diff --git a/lib/maxmind/geoip/geoipv6.inc.php b/lib/maxmind/geoip/geoipv6.inc.php index 709a8d3fa..de3933d68 100644 --- a/lib/maxmind/geoip/geoipv6.inc.php +++ b/lib/maxmind/geoip/geoipv6.inc.php @@ -251,7 +251,7 @@ class GeoIP { ); } -function geoip_load_shared_mem ($file) { +function _lib_geoip_load_shared_mem ($file) { $fp = fopen($file, "rb"); if (!$fp) { @@ -390,7 +390,7 @@ function _setup_segments($gi){ return $gi; } -function geoip_open($filename, $flags) { +function _lib_geoip_open($filename, $flags) { $gi = new GeoIP; $gi->flags = $flags; if ($gi->flags & GEOIP_SHARED_MEMORY) { @@ -407,7 +407,7 @@ function geoip_open($filename, $flags) { return $gi; } -function geoip_close($gi) { +function _lib_geoip_close($gi) { if ($gi->flags & GEOIP_SHARED_MEMORY) { return true; } @@ -415,7 +415,7 @@ function geoip_close($gi) { return fclose($gi->filehandle); } -function geoip_country_id_by_name_v6($gi, $name) { +function _lib_geoip_country_id_by_name_v6($gi, $name) { $rec = dns_get_record($name, DNS_AAAA); if ( !$rec ) { return false; @@ -424,75 +424,75 @@ function geoip_country_id_by_name_v6($gi, $name) { if (!$addr || $addr == $name) { return false; } - return geoip_country_id_by_addr_v6($gi, $addr); + return _lib_geoip_country_id_by_addr_v6($gi, $addr); } -function geoip_country_id_by_name($gi, $name) { +function _lib_geoip_country_id_by_name($gi, $name) { $addr = gethostbyname($name); if (!$addr || $addr == $name) { return false; } - return geoip_country_id_by_addr($gi, $addr); + return _lib_geoip_country_id_by_addr($gi, $addr); } -function geoip_country_code_by_name_v6($gi, $name) { - $country_id = geoip_country_id_by_name_v6($gi,$name); +function _lib_geoip_country_code_by_name_v6($gi, $name) { + $country_id = _lib_geoip_country_id_by_name_v6($gi,$name); if ($country_id !== false) { return $gi->GEOIP_COUNTRY_CODES[$country_id]; } return false; } -function geoip_country_code_by_name($gi, $name) { - $country_id = geoip_country_id_by_name($gi,$name); +function _lib_geoip_country_code_by_name($gi, $name) { + $country_id = _lib_geoip_country_id_by_name($gi,$name); if ($country_id !== false) { return $gi->GEOIP_COUNTRY_CODES[$country_id]; } return false; } -function geoip_country_name_by_name_v6($gi, $name) { - $country_id = geoip_country_id_by_name_v6($gi,$name); +function _lib_geoip_country_name_by_name_v6($gi, $name) { + $country_id = _lib_geoip_country_id_by_name_v6($gi,$name); if ($country_id !== false) { return $gi->GEOIP_COUNTRY_NAMES[$country_id]; } return false; } -function geoip_country_name_by_name($gi, $name) { - $country_id = geoip_country_id_by_name($gi,$name); +function _lib_geoip_country_name_by_name($gi, $name) { + $country_id = _lib_geoip_country_id_by_name($gi,$name); if ($country_id !== false) { return $gi->GEOIP_COUNTRY_NAMES[$country_id]; } return false; } -function geoip_country_id_by_addr_v6($gi, $addr) { +function _lib_geoip_country_id_by_addr_v6($gi, $addr) { $ipnum = inet_pton($addr); return _geoip_seek_country_v6($gi, $ipnum) - GEOIP_COUNTRY_BEGIN; } -function geoip_country_id_by_addr($gi, $addr) { +function _lib_geoip_country_id_by_addr($gi, $addr) { $ipnum = ip2long($addr); return _geoip_seek_country($gi, $ipnum) - GEOIP_COUNTRY_BEGIN; } -function geoip_country_code_by_addr_v6($gi, $addr) { - $country_id = geoip_country_id_by_addr_v6($gi,$addr); +function _lib_geoip_country_code_by_addr_v6($gi, $addr) { + $country_id = _lib_geoip_country_id_by_addr_v6($gi,$addr); if ($country_id !== false) { return $gi->GEOIP_COUNTRY_CODES[$country_id]; } return false; } -function geoip_country_code_by_addr($gi, $addr) { +function _lib_geoip_country_code_by_addr($gi, $addr) { if ($gi->databaseType == GEOIP_CITY_EDITION_REV1) { - $record = geoip_record_by_addr($gi,$addr); + $record = _lib_geoip_record_by_addr($gi,$addr); if ( $record !== false ) { return $record->country_code; } } else { - $country_id = geoip_country_id_by_addr($gi,$addr); + $country_id = _lib_geoip_country_id_by_addr($gi,$addr); if ($country_id !== false) { return $gi->GEOIP_COUNTRY_CODES[$country_id]; } @@ -500,20 +500,20 @@ function geoip_country_code_by_addr($gi, $addr) { return false; } -function geoip_country_name_by_addr_v6($gi, $addr) { - $country_id = geoip_country_id_by_addr_v6($gi,$addr); +function _lib_geoip_country_name_by_addr_v6($gi, $addr) { + $country_id = _lib_geoip_country_id_by_addr_v6($gi,$addr); if ($country_id !== false) { return $gi->GEOIP_COUNTRY_NAMES[$country_id]; } return false; } -function geoip_country_name_by_addr($gi, $addr) { +function _lib_geoip_country_name_by_addr($gi, $addr) { if ($gi->databaseType == GEOIP_CITY_EDITION_REV1) { - $record = geoip_record_by_addr($gi,$addr); + $record = _lib_geoip_record_by_addr($gi,$addr); return $record->country_name; } else { - $country_id = geoip_country_id_by_addr($gi,$addr); + $country_id = _lib_geoip_country_id_by_addr($gi,$addr); if ($country_id !== false) { return $gi->GEOIP_COUNTRY_NAMES[$country_id]; } @@ -656,7 +656,7 @@ function _get_org($gi,$ipnum){ -function geoip_name_by_addr_v6 ($gi,$addr) { +function _lib_geoip_name_by_addr_v6 ($gi,$addr) { if ($addr == NULL) { return 0; } @@ -664,7 +664,7 @@ function geoip_name_by_addr_v6 ($gi,$addr) { return _get_org_v6($gi, $ipnum); } -function geoip_name_by_addr ($gi,$addr) { +function _lib_geoip_name_by_addr ($gi,$addr) { if ($addr == NULL) { return 0; } @@ -672,8 +672,8 @@ function geoip_name_by_addr ($gi,$addr) { return _get_org($gi, $ipnum); } -function geoip_org_by_addr ($gi,$addr) { - return geoip_name_by_addr($gi, $addr); +function _lib_geoip_org_by_addr ($gi,$addr) { + return _lib_geoip_name_by_addr($gi, $addr); } function _get_region($gi,$ipnum){ @@ -707,7 +707,7 @@ function _get_region($gi,$ipnum){ } } -function geoip_region_by_addr ($gi,$addr) { +function _lib_geoip_region_by_addr ($gi,$addr) { if ($addr == NULL) { return 0; } |