From 988640d3632d620903f89aaa87d865df8c736a10 Mon Sep 17 00:00:00 2001 From: Renato Botelho Date: Thu, 7 Feb 2019 12:57:05 -0200 Subject: Make get_countr_code() parameter default to 'ALL' --- src/etc/inc/pfsense-utils.inc | 2 +- src/usr/local/www/getserviceproviders.php | 2 +- src/usr/local/www/interfaces_ppps_edit.php | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/etc/inc/pfsense-utils.inc b/src/etc/inc/pfsense-utils.inc index 6c85100..e11ccd1 100644 --- a/src/etc/inc/pfsense-utils.inc +++ b/src/etc/inc/pfsense-utils.inc @@ -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 ""; } diff --git a/src/usr/local/www/getserviceproviders.php b/src/usr/local/www/getserviceproviders.php index 7304588..5de9e57 100644 --- a/src/usr/local/www/getserviceproviders.php +++ b/src/usr/local/www/getserviceproviders.php @@ -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']) { diff --git a/src/usr/local/www/interfaces_ppps_edit.php b/src/usr/local/www/interfaces_ppps_edit.php index 6eb5f11..31755bb 100644 --- a/src/usr/local/www/interfaces_ppps_edit.php +++ b/src/usr/local/www/interfaces_ppps_edit.php @@ -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']; -- cgit v1.1