- When a location group is initially created the Country Code variable is blank. This
causes an error message that the Country Code is invalid before any country code
has been selected. This was flagged up by a new forum member.
- This change only checks the Country Code variable for being valid if it is not blank
- If this is not the best way to fix this problem, feel free to modify or replace it.
- Tested as working on my vm testbed.
Tested-by: Adolf Belka <adolf.belka@ipfire.org>
Signed-off-by: Adolf Belka <adolf.belka@ipfire.org>
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
# Check name
if (!&validhostname($grp)){$errormessage.=$Lang::tr{'fwhost err name'};}
- unless (&General::validcc($fwhostsettings{'COUNTRY_CODE'})) {
- $errormessage = $Lang::tr{'fwhost invalid country code'};
+ if ($fwhostsettings{'COUNTRY_CODE'} ne ''){
+ unless (&General::validcc($fwhostsettings{'COUNTRY_CODE'})) {
+ $errormessage = $Lang::tr{'fwhost invalid country code'};
+ }
}
# Check for existing group name.