mirror of
https://github.com/vincentmli/bpfire.git
synced 2026-04-13 20:42:58 +02:00
location-functions.pl: Add get_continent_code() function.
This tiny function is used to get the continent code for a given country code. Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org> Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
This commit is contained in:
committed by
Michael Tremer
parent
f46fd07814
commit
5bf91fe1b1
@@ -190,6 +190,16 @@ sub get_locations() {
|
||||
return @sorted_locations;
|
||||
}
|
||||
|
||||
# Function to get the continent code of a given country code.
|
||||
sub get_continent_code($) {
|
||||
my ($country_code) = @_;
|
||||
|
||||
# Use location module to grab the continent code.
|
||||
my $continent_code = &Location::get_continent_code($db_handle, $country_code);
|
||||
|
||||
return $continent_code;
|
||||
}
|
||||
|
||||
# Function to check if a given address has one ore more special flags.
|
||||
sub address_has_flags($) {
|
||||
my ($address) = @_;
|
||||
|
||||
Reference in New Issue
Block a user