From 80cf629c0fa9d001e1b3a03560535bf2b987a7b0 Mon Sep 17 00:00:00 2001 From: steve-lad <72376554+steve-lad@users.noreply.github.com> Date: Sat, 24 Jul 2021 09:39:57 +0200 Subject: [PATCH] Update ajaxHelper.php --- sccpManTraits/ajaxHelper.php | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/sccpManTraits/ajaxHelper.php b/sccpManTraits/ajaxHelper.php index 324b54b..1c8d258 100644 --- a/sccpManTraits/ajaxHelper.php +++ b/sccpManTraits/ajaxHelper.php @@ -732,11 +732,15 @@ trait ajaxHelper { } break; case 'phonecodepage': - $value = 'ISO8859-1'; - // TODO: May be other exceptions. Historically this is the only one handled + // TODO: May be other exceptions so use switch. Historically this is the only one handled if (!empty($get_settings["{$hdr_prefix}devlang"])) { - if ($get_settings["{$hdr_prefix}devlang"] == "Russian_Russian_Federation") { - $value = 'CP1251'; + switch ($get_settings["{$hdr_prefix}devlang"]) { + case 'Russian_Russian_Federation': + $value = 'CP1251'; + break; + default: + $value = 'ISO8859-1'; + break; } } break;