tor.cgi: fix calling Perl location module functions

Message ID 5b187b8e-50d4-870f-4e1a-7309493b9261@ipfire.org
State Superseded
Headers
Series tor.cgi: fix calling Perl location module functions |

Commit Message

Peter Müller Oct. 9, 2020, 7:15 p.m. UTC
  Fixes: #12492

Cc: Stefan Schantl <stefan.schantl@ipfire.org>
Signed-off-by: Peter Müller <peter.mueller@ipfire.org>
---
 html/cgi-bin/tor.cgi | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
  

Patch

diff --git a/html/cgi-bin/tor.cgi b/html/cgi-bin/tor.cgi
index 28dec6cf0..c1a9e509c 100644
--- a/html/cgi-bin/tor.cgi
+++ b/html/cgi-bin/tor.cgi
@@ -322,14 +322,14 @@  END
 					<select name='TOR_EXIT_COUNTRY'>
 						<option value=''>- $Lang::tr{'tor exit country any'} -</option>
 END
-
-		my @country_codes = &Location::database_countries();
+		my $db_handle = &Location::Functions::init();
+		my @country_codes = &Location::database_countries($db_handle);
 		foreach my $country_code (@country_codes) {
 			# Convert country code into upper case format.
 			$country_code = uc($country_code);
 
 			# Get country name.
-			my $country_name = &Location::Functions::get_country_name($country_code);
+			my $country_name = &Location::Functions::get_full_country_name($country_code);
 
 			print "<option value='$country_code'";