]> git.ipfire.org Git - people/pmueller/ipfire-2.x.git/commitdiff
country.cgi: Use own location-functions.
authorStefan Schantl <stefan.schantl@ipfire.org>
Tue, 22 Sep 2020 18:25:02 +0000 (20:25 +0200)
committerMichael Tremer <michael.tremer@ipfire.org>
Thu, 24 Sep 2020 17:36:38 +0000 (17:36 +0000)
Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
html/cgi-bin/country.cgi

index a1cf24347396fcdd50a5b75465154ad6a2ea6dac..b519d89b3c98e381339c91e093a19a7f3a43f545 100644 (file)
@@ -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;
        </tr>
 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) {