From: Stefan Schantl Date: Tue, 22 Sep 2020 18:25:02 +0000 (+0200) Subject: country.cgi: Use own location-functions. X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=8710bac10f51d0b4c165101df607003344a0c8a3;p=people%2Fms%2Fipfire-2.x.git country.cgi: Use own location-functions. Signed-off-by: Stefan Schantl Signed-off-by: Michael Tremer --- diff --git a/html/cgi-bin/country.cgi b/html/cgi-bin/country.cgi index a1cf243473..b519d89b3c 100644 --- a/html/cgi-bin/country.cgi +++ b/html/cgi-bin/country.cgi @@ -21,8 +21,6 @@ use strict; -use Locale::Codes::Country; - my $col; my $lines = '1'; my $lines2 = ''; @@ -32,6 +30,8 @@ require "${General::swroot}/location-functions.pl"; require "${General::swroot}/lang.pl"; require "${General::swroot}/header.pl"; +require "${General::swroot}/location-functions.pl"; + &Header::showhttpheaders(); &Header::openpage($Lang::tr{'countries'}, 1, ''); @@ -52,8 +52,11 @@ print< END +# Init libloc database connection. +my $db_handle = &Location::Functions::init(); + # Get a list of all supported country codes. -my @countries = Locale::Codes::Country::all_country_codes(); +my @countries = &Location::database_countries($db_handle); # Loop through whole country list. foreach my $country (@countries) {