[dw-free] LJ::User::country_of_remote_ip not used anywhere
[commit: http://hg.dwscoalition.org/dw-free/rev/a1e8af07039f]
http://bugs.dwscoalition.org/show_bug.cgi?id=3664
Remove unused function (cleanup)
Patch by
fu.
Files modified:
http://bugs.dwscoalition.org/show_bug.cgi?id=3664
Remove unused function (cleanup)
Patch by
![[personal profile]](https://www.dreamwidth.org/img/silk/identity/user.png)
Files modified:
- cgi-bin/LJ/User.pm
-------------------------------------------------------------------------------- diff -r 1ed4c51bc408 -r a1e8af07039f cgi-bin/LJ/User.pm --- a/cgi-bin/LJ/User.pm Mon May 16 21:50:56 2011 +0800 +++ b/cgi-bin/LJ/User.pm Mon May 16 22:36:08 2011 +0800 @@ -7524,27 +7524,6 @@ =head2 Login, Session, and Rename Functions (LJ) =cut -# returns the country that the remote IP address comes from -# undef is returned if the country cannot be determined from the IP -sub country_of_remote_ip { - if (eval "use IP::Country::Fast; 1;") { - my $ip = LJ::get_remote_ip(); - return undef unless $ip; - - my $reg = IP::Country::Fast->new(); - my $country = $reg->inet_atocc($ip); - - # "**" is returned if the IP is private - return undef if $country eq "**"; - return $country; - } - - return undef; -} - -1; - - sub get_active_journal { return $LJ::ACTIVE_JOURNAL; --------------------------------------------------------------------------------