From 4fb0ec58b166993e253bc73cd98ceaf3e723e72c Mon Sep 17 00:00:00 2001 From: stevenA Date: Mon, 17 Jan 2022 10:13:13 +0100 Subject: [PATCH] Update ajaxHelper.php Change selection of phonecodepage depending on phone type (java/non-java) --- sccpManTraits/ajaxHelper.php | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/sccpManTraits/ajaxHelper.php b/sccpManTraits/ajaxHelper.php index f482dc9..4d13904 100644 --- a/sccpManTraits/ajaxHelper.php +++ b/sccpManTraits/ajaxHelper.php @@ -231,8 +231,8 @@ trait ajaxHelper { case 'deleteSoftKey': if (!empty($request['softkey'])) { - $id_name = $request['softkey']; - unset($this->sccp_conf_init[$id_name]); + //$id_name = $request['softkey']; + unset($this->sccp_conf_init[$request['softkey']]); $this->createDefaultSccpConfig($this->sccpvalues, $this->sccppath["asterisk"]); $msg = print_r($this->aminterface->core_sccp_reload(), 1); return array('status' => true, 'table_reload' => true); @@ -544,6 +544,13 @@ trait ajaxHelper { '6901', '6911', '6921', '6945', '7902', '7905', '7910', '7911', '7912', '7914', '7915', '7916', '7920', '7925', '7926', '7931', '7935', '7936', '7937', '7940', '7960' ); // TODO: May be other exceptions so use switch. Historically this is the only one handled + // phonecodepage depends on 2 variables - language and phone type (uses java or not). + // Non java phones use ISO8859-1 or CP1251 (Cyrillic); java phones use UTF-8. See @dkgroot. + // Below list is not definitive or necessarily accurate - needs to be maintained. + $nonJavaPhones = array( + '6901', '6911', '6921', '6945', '7902', '7905', '7910', '7911', '7912', '7914', '7915', '7916', '7920', '7925', '7926', '7931', '7935', '7936', '7937', '7940', '7960' + ); + dbug($get_settings); //[sccp_hw_type] if (!empty($get_settings["{$hdr_prefix}devlang"])) { switch ($get_settings["{$hdr_prefix}devlang"]) { case 'Russian_Russian_Federation':