Diederik de Groot <dkgroot@talon.nl> 03.11.2017

- Update README.md
  - Commented out astman_retrieveJSFromMetaData in install.php (was moved to srvinterface)
  - Addd/Updated some !TODO! entries
  - Spelling:
  - devise -> device
  - Compatable/Comable -> Compatible
  - Templet -> Template
  - buton -> button
  - Templatee -> Template
This commit is contained in:
PhantomVl 2017-11-03 17:09:53 +03:00
parent a382e74490
commit 9a18a0940b
7 changed files with 43 additions and 97 deletions

View file

@ -608,7 +608,7 @@ class Sccp_manager extends \FreePBX_Helpers implements \BMO {
$ver_id = $this->sccp_create_device_XML($data['name']);
};
/* !TODO!: Do these returned message strings work with i18n ? */
return array('status' => true, 'message' => 'Create new config files (version:' . $ver_id . ')'));
return array('status' => true, 'message' => 'Create new config files (version:' . $ver_id . ')');
break;
case 'reset_token':

View file

@ -14,7 +14,9 @@ class dbinterface {
}
public function info() {
return Array('Version' => '13.0.2', 'about' =>'Data access interface v. 13.0.2');
$Ver = '13.0.2';
return Array('Version' => $Ver,
'about' =>'Data access interface ver: '.$Ver);
}
/*

View file

@ -9,8 +9,9 @@ class extconfigs {
}
public function info() {
return Array('Version' => '13.0.2',
'about' =>'Default Setings and Enums ver: 13.0.2');
$Ver = '13.0.2';
return Array('Version' => $Ver,
'about' =>'Default Setings and Enums ver: '.$Ver);
}
public function getextConfig($id = '', $index = '') {
@ -25,15 +26,22 @@ class extconfigs {
$result = $this->sccpDefaults;
break;
case 'sccp_timezone':
$result = $this->cisco_timezone;
break;
case 'cisco_time':
$result = array();
foreach ($this->cisco_timezone as $key => $value) {
$cisco_code = $key .' Standard'.((empty($value['daylight']))? '': '/'.$value['daylight']).' Time';
if (isset($value['cisco_code'])) {
$cisco_code = (empty($value['cisco_code']))? $cisco_code : $value['cisco_code'];
}
$result[$key] = array('offset' => $value['offset'], 'daylight' => $value['daylight'], 'cisco_code' =>$cisco_code);
}
break;
/* case 'cisco_time':
$result = array();
foreach ($this->cisco_timezone as $key => $value) {
$result[] = array('id'=> ($value['offset']/60) ,'val'=>$key.((empty($value['daylight']))? '': '/'.$value['daylight']));
}
break;
*/
case 'cisco_timezone':
$result = array();
foreach ($this->cisco_timezone as $key => $value) {
@ -165,20 +173,20 @@ class extconfigs {
'Jerusalem' => array('offset' => '120', 'daylight' => 'Daylight'),
'Saudi Arabia' => array('offset' => '180', 'daylight' => ''),
/* Russion Regions */
'Russian/Kaliningrad' => array('offset' => '120', 'daylight' => ''),
'Russian/Moscow' => array('offset' => '180', 'daylight' => ''),
'Russian/St.Peterburg' => array('offset' => '180', 'daylight' => ''),
'Russian/Samara' => array('offset' => '240', 'daylight' => ''),
'Russian/Novosibirsk' => array('offset' => '300', 'daylight' => ''),
'Russian/Ekaterinburg' => array('offset' => '300', 'daylight' => ''),
'Russian/Irkutsk' => array('offset' => '480', 'daylight' => ''),
'Russian/Yakutsk' => array('offset' => '540', 'daylight' => ''),
'Russian/Khabarovsk' => array('offset' => '600', 'daylight' => ''),
'Russian/Vladivostok' => array('offset' => '600', 'daylight' => ''),
'Russian/Sakhalin' => array('offset' => '660', 'daylight' => ''),
'Russian/Magadan' => array('offset' => '660', 'daylight' => ''),
'Russian/Kamchatka' => array('offset' => '720', 'daylight' => ''),
/* EnD - Russion Regions */
'Russian/Kaliningrad' => array('offset' => '120', 'daylight' => '', 'cisco_code' => 'South Africa Standard Time'),
'Russian/Moscow' => array('offset' => '180', 'daylight' => '', 'cisco_code' => 'Russian Standard Time'),
'Russian/St.Peterburg' => array('offset' => '180', 'daylight' => '', 'cisco_code' => 'Russian Standard Time'),
'Russian/Samara' => array('offset' => '240', 'daylight' => '', 'cisco_code' => 'Arabian Standard Time'),
'Russian/Novosibirsk' => array('offset' => '300', 'daylight' => '', 'cisco_code' => 'Ekaterinburg Standard Time'),
'Russian/Ekaterinburg' => array('offset' => '300', 'daylight' => '', 'cisco_code' => 'Ekaterinburg Standard Time'),
'Russian/Irkutsk' => array('offset' => '480', 'daylight' => '', 'cisco_code' => 'China Standard Time'),
'Russian/Yakutsk' => array('offset' => '540', 'daylight' => '', 'cisco_code' => 'Tokyo Standard Time'),
'Russian/Khabarovsk' => array('offset' => '600', 'daylight' => '', 'cisco_code' => 'West Pacific Standard Time'),
'Russian/Vladivostok' => array('offset' => '600', 'daylight' => '', 'cisco_code' => 'West Pacific Standard Time'),
'Russian/Sakhalin' => array('offset' => '660', 'daylight' => '', 'cisco_code' => 'Central Pacific Standard Time'),
'Russian/Magadan' => array('offset' => '660', 'daylight' => '', 'cisco_code' => 'Central Pacific Standard Time'),
'Russian/Kamchatka' => array('offset' => '720', 'daylight' => '', 'cisco_code' => 'Fiji Standard Time'),
/* EnD - Russion Regions */
'Iran' => array('offset' => '210', 'daylight' => 'Daylight'),
'Caucasus' => array('offset' => '240', 'daylight' => 'Daylight'),

View file

@ -14,8 +14,9 @@ class srvinterface {
public function __construct() {
}
public function info() {
return Array('Version' => '13.0.2',
'about' =>'Server interface data ver 13.0.2');
$Ver = '13.0.2';
return Array('Version' => $Ver,
'about' =>'Server interface data ver: '.$Ver);
}
/*

View file

@ -14,8 +14,9 @@ class xmlinterface {
public function __construct() {
}
public function info() {
return Array('Version' => '13.0.2',
'about' =>'Create XML data interface v. 13.0.2');
$Ver = '13.0.2';
return Array('Version' => $Ver,
'about' =>'Create XML data interface ver: '.$Ver);
}
@ -168,11 +169,12 @@ class xmlinterface {
$tz_id = $data_values['ntp_timezone'];
$TZdata = $data_values['ntp_timezone_id'];
if (empty($TZdata)){
$TZdata = array('offset' => '0', 'daylight' => '');
$TZdata = array('offset' => '0', 'daylight' => '', 'cisco_code' => 'Greenwich Standard Time');
}
$xnode->name = $tz_id;
$xnode->dateTemplate = $data_values['dateformat'];
$xnode->timeZone = $tz_id.' Standard'.((empty($TZdata['daylight']))? '': '/'.$TZdata['daylight']).' Time';
$xnode->timeZone = $TZdata['cisco_code'];
// $xnode->timeZone = $tz_id.' Standard'.((empty($TZdata['daylight']))? '': '/'.$TZdata['daylight']).' Time';
if ($data_values['ntp_config_enabled'] == 'yes') {
$xnode->ntps->ntp->name = $data_values['ntp_server'];

View file

@ -283,11 +283,10 @@ class Sccp extends \FreePBX\modules\Core\Driver {
$select[] = array('value' => 'reject', 'text' => 'Reject');
$select[] = array('value' => 'silent', 'text' => 'Silent');
$select[] = array('value' => 'UserDefined', 'text' => 'UserDefined');
$tt = _("DND: How will dnd react when it is set on the device level dnd can have three states: off / busy(reject) / silent / UserDefined").'<br>'.
# !TODO!: The next entry should be "null/empty" (not UserDefined) -> to indicate the trie-state behaviour
_("UserDefined - dnd that cycles through all three states off -> reject -> silent -> off (this is the normal behaviour)").'<br>'.
r
# !TODO!: Userdefined is also a possible state, but it is not used or implemented (and it should not be implemented here, i think)
$tt = _("DND: How will dnd react when it is set on the device level dnd can have three states: off / busy(reject) / silent / UserDefined").'<br>'.
_("UserDefined - dnd that cycles through all three states off -> reject -> silent -> off (this is the normal behaviour)").'<br>'.
_("Reject - Usesr can only switch off and on (in reject/busy mode)").'<br>'.
_("Silent - Usesr can only switch off and on (in silent mode)");
$tmparr['dnd'] = array('prompttext' => _('DND'), 'value' => 'UserDefined', 'tt' => $tt, 'select' => $select, 'level' => 1, 'type' => 'radio');

View file

@ -19,29 +19,6 @@ if(class_exists($class,false)) {
$srvinterface = new $class();
}
/* unused / moved to srvinterface
//
// Helper function to retrieve SCCPConfigMetaData via ASTMan
// segment: ["", "general","device","line","softkey"]}
// returns a php variable (array/set)
//
// Move to seperate helper file
function astman_retrieveJSFromMetaData($astman, $segment = "") {
$params = array();
if ($segment != "") {
$params["Segment"] = $segment;
}
$response = $astman->send_request('SCCPConfigMetaData', $params);
if ($response["Response"] == "Success") {
//outn(_("JSON-content:").$response["JSON"]);
$decode=json_decode($response["JSON"], true);
return $decode;
} else {
return false;
}
}
*/
function Get_DB_config($sccp_compatible) {
$db_config_v0 = array(
'sccpdevmodel' => array(
@ -348,49 +325,6 @@ function InstallDB_sccpdevmodel() {
return true;
}
/*
function InstallDB_updateEnums($db_config) {
global $db;
if (!$db_config) {
die_freepbx("No db_config provided");
}
$count_modify = 0;
outn("<li>" . _("Update Database Enums") . "</li>");
foreach ($db_config as $tabl_name => &$tab_modify) {
$sql = "";
$sql_r = array();
foreach ($tab_modify as $row_fld => $row_data){
if (!empty($row_data['crate'])) {
if (strpos($row_data['crate'], 'enum') !== false) {
$sql_r[] = $row_fld;
}
}
}
$sql = "SELECT " . implode(',', $sql_r) . " from ".$tabl_name;
$db_result= $db->getAll($sql);
if (DB::IsError($db_result)) {
die_freepbx("Can not add get informations from ".$tabl_name." table\n");
}
$sql_table = '';
$enum_data = array('true'=>'on','false'=>'off','yes'=>'on','no'=>'off');
foreach ($db_result as $tabl_data){
$sql = "";
foreach( $tabl_data as $row => $col_val){
$val= strtolower($col_val);
if (isset($enum_data[$val])) {
$sql .= $row.'="'.$enum_data[$val].'",';
}
}
if (!empty($sql)){
}
}
}
}
*/
function InstallDB_updateSchema($db_config) {
global $db;
if (!$db_config) {