Make get_countr_code() parameter default to 'ALL'

This commit is contained in:
Renato Botelho 2019-02-07 12:57:05 -02:00
parent 7e8bfed216
commit d166b7e25d
3 changed files with 3 additions and 3 deletions

View File

@ -2763,7 +2763,7 @@ function xml2array($contents, $get_attributes = 1, $priority = 'tag') {
return ($xml_array);
}
function get_country_name($country_code) {
function get_country_name($country_code = "ALL") {
if ($country_code != "ALL" && strlen($country_code) != 2) {
return "";
}

View File

@ -48,7 +48,7 @@ function get_country_providers($country) {
function country_list() {
global $serviceproviders;
$country_list = get_country_name("ALL");
$country_list = get_country_name();
foreach ($serviceproviders as $sp) {
foreach ($country_list as $country) {
if (strtoupper($sp['attr']['code']) == $country['code']) {

View File

@ -473,7 +473,7 @@ function build_country_list() {
$list = array();
// get_country_name is in pfSense-utils.inc
$country_list = get_country_name("ALL");
$country_list = get_country_name();
foreach ($country_list as $country) {
$list[$country['code']] = $country['name'];