From cf54bb400a0022f97596c37f90cc44fbd8b57300 Mon Sep 17 00:00:00 2001 From: PhantomVl Date: Wed, 22 May 2019 08:47:28 +0300 Subject: [PATCH] - Bug Fix --- Sccp_manager.inc/extconfigs.class.php | 2 +- views/formShow.php | 21 ++++++------ views/server.info.php | 48 +++++++++++++-------------- 3 files changed, 35 insertions(+), 36 deletions(-) diff --git a/Sccp_manager.inc/extconfigs.class.php b/Sccp_manager.inc/extconfigs.class.php index 2b1d79d..5220621 100644 --- a/Sccp_manager.inc/extconfigs.class.php +++ b/Sccp_manager.inc/extconfigs.class.php @@ -255,7 +255,7 @@ class extconfigs { } if (empty($base_config["tftp_path"])) { if (!empty($this->paren_class)) { - $this->paren_class->class_error['tftp_path'] = 'Tftp path not defined'; + $this->paren_class->class_error['tftp_path'] = 'Tftp path not exist or not defined'; } return array('error' => 'empty tftp_path'); } diff --git a/views/formShow.php b/views/formShow.php index 35cfeb2..5f4cb46 100644 --- a/views/formShow.php +++ b/views/formShow.php @@ -36,10 +36,21 @@ $time_zone = array('-12' => 'GTM -12', '-11' => 'GTM -11', '-10' => 'GTM -10', ' '08' => 'GTM +8', '09' => 'GTM +9', '10' => 'GTM +10', '11'=> 'GTM +11', '12' => 'GTM +12'); $time_zone_name = array(); +$extension_list = array(); +$sofkey_list = array(); +$model_list = array(); +$device_list = array(); //$time_zone_name = \FreePBX::Sccp_manager()-> extconfigs-> getextConfig('cisco_timezone'); //$time_zone = \FreePBX::Sccp_manager()-> extconfigs-> getextConfig('cisco_time'); //$system_time_zone = \FreePBX::Sccp_manager()->getSysnemTimeZone(); +//$sofkey_list = \FreePBX::Sccp_manager()-> srvinterface -> sccp_list_keysets(); +//$model_list = \FreePBX::Sccp_manager()->dbinterface->get_db_SccpTableData("HWDevice"); +//$extension_list = \FreePBX::Sccp_manager()->dbinterface->get_db_SccpTableData("HWextension"); +//$device_list = \FreePBX::Sccp_manager()->dbinterface->get_db_SccpTableData("SccpDevice"); +//$extension_list[]=array(model=>'NONE', vendor=>'CISCO', dns=>'0'); +//$device_list[]=array(name=>'NONE', description=>'No Device'); + //print_r($metainfo); if (\FreePBX::Modules()->checkStatus("soundlang")) { @@ -55,17 +66,7 @@ if (function_exists('music_list')){ if (!is_array($moh_list)){ $moh_list = array('default'); } -$sofkey_list = array(); -$model_list = array(); -$extension_list = array(); -$device_list = array(); -//$sofkey_list = \FreePBX::Sccp_manager()-> srvinterface -> sccp_list_keysets(); -// $model_list = \FreePBX::Sccp_manager()->dbinterface->get_db_SccpTableData("HWDevice"); -//$extension_list = \FreePBX::Sccp_manager()->dbinterface->get_db_SccpTableData("HWextension"); -//$device_list = \FreePBX::Sccp_manager()->dbinterface->get_db_SccpTableData("SccpDevice"); -//$extension_list[]=array(model=>'NONE', vendor=>'CISCO', dns=>'0'); -//$device_list[]=array(name=>'NONE', description=>'No Device'); $items = $itm -> children(); diff --git a/views/server.info.php b/views/server.info.php index 768960a..42f3406 100644 --- a/views/server.info.php +++ b/views/server.info.php @@ -4,10 +4,7 @@ * To change this template file, choose Tools | Templates * and open the template in the editor. */ -// vim: set ai ts=4 sw=4 ft=phtml: -// print_r($this->sccp_conf_init); -// print_r($this->sccpvalues); -//print_r('

'); + $driver = $this->FreePBX->Core->getAllDriversInfo(); $core = $this->srvinterface->getSCCPVersion(); @@ -22,22 +19,23 @@ foreach ($ast_realtime as $key => $value) { } } } -$info = array(); -$conf_realtime = $this->extconfigs->validate_RealTime($ast_realm); +$conf_realtime = $this->extconfigs->validate_RealTime($ast_realm); +$db_Schema = $this->dbinterface->validate(); +$mysql_info = $this->dbinterface->get_db_sysvalues(); +$compatable = $this->srvinterface->get_compatible_sccp(); +$info = array(); + $info['srvinterface'] = $this->srvinterface->info(); -$info['extconfigs'] = $this->extconfigs->info(); -$info['dbinterface'] = $this->dbinterface->info(); -$info['aminterface'] = $this->aminterface->info(); -$db_Schema = $this->dbinterface->validate(); - -$mysql_info = $this->dbinterface->get_db_sysvalues(); +$info['extconfigs'] = $this->extconfigs->info(); +$info['dbinterface'] = $this->dbinterface->info(); +$info['aminterface'] = $this->aminterface->info(); +$info['XML'] = $this->xmlinterface->info(); +$info['sccp_class'] = $driver['sccp']; +$info['Core_sccp'] = array('Version' => $core['Version'], 'about'=> 'Sccp ver.'. $core['Version'].' r'.$core['vCode']. ' Revision :'. $core['RevisionNum']. ' Hash :'. $core['RevisionHash']); +$info['Asterisk'] = array('Version' => FreePBX::Config()->get('ASTVERSION'), 'about'=> 'Asterisk.'); -$info['XML'] = $this->xmlinterface->info(); -$info['sccp_class'] = $driver['sccp']; -$info['Core_sccp'] = array('Version' => $core['Version'], 'about'=> 'Sccp ver.'. $core['Version'].' r'.$core['vCode']. ' Revision :'. $core['RevisionNum']. ' Hash :'. $core['RevisionHash']); -$info['Asterisk'] = array('Version' => FreePBX::Config()->get('ASTVERSION'), 'about'=> 'Asterisk.'); if (!empty($this->sccpvalues['SccpDBmodel'])) { $info['DB Model'] = array('Version' => $this->sccpvalues['SccpDBmodel']['data'], 'about'=> 'SCCP DB Configure'); } @@ -48,16 +46,16 @@ if (!empty($this->sccpvalues['tftp_rewrite'])) { $info['TFTP_Rewrite'] = array('Version' => 'base', 'about'=> 'Rewrite Supported'); } } -$info['Сompatible'] = array('Version' => $this->srvinterface->get_compatible_sccp(), 'about'=> 'Ok'); +$info['Сompatible'] = array('Version' => $compatable, 'about'=> 'Ok'); if (!empty($this->sccpvalues['SccpDBmodel'])) { - if ($this->srvinterface->get_compatible_sccp()> $this->sccpvalues['SccpDBmodel']['data']){ + if ($compatable > $this->sccpvalues['SccpDBmodel']['data']){ $info['Сompatible']['about'] = '
Reinstall SCCP manager required
'; } } if ($db_Schema == 0) { $info['DB_Schema'] = array('Version' => 'Error', 'about'=> '
ERROR DB Version
'); } else { - $info['DB_Schema'] = array('Version' => $db_Schema, 'about'=> (($this->srvinterface->get_compatible_sccp() == $db_Schema ) ? 'Ok' : 'Incompatable Version')); + $info['DB_Schema'] = array('Version' => $db_Schema, 'about'=> (($compatable == $db_Schema ) ? 'Ok' : 'Incompatable Version')); } if (empty($ast_realtime)) { @@ -69,7 +67,7 @@ if (empty($ast_realtime)) { if ($key == $ast_realm) { if ($value['status'] == 'OK') { $rt_sccp = 'TEST OK'; - $rt_info .= 'SCCP conettions found'; + $rt_info .= 'SCCP Connections found'; } else { $rt_sccp = 'SCCP ERROR'; $rt_info .= '
Error : '. $value['message']. '
'; @@ -145,9 +143,9 @@ print_r("
Help Info:
");
                             foreach ($this->info_warning as $key => $value) {
                                 echo '

'.$key.'

'; if (is_array($value)) { - echo '
  • '.implode('
  • ',$value).'
  • '; + echo '
  • '.implode('
  • ', $value).'
  • '; } else { - echo '
  • '.$value.'
  • '; + echo '
  • '. _($value).'
  • '; } } ?> @@ -165,13 +163,13 @@ if (!empty($this->class_error)) {
    -

    Sccp Manager Error

    +

    Diagnostic information about SCCP Manager errors

    -
    There are Error in the SCCP Module:
    +                    
    There is an error in the :
                             class_error); ?>
                         

    Correct these problems before continuing to work.
    -

    Open 'SCCP Conectivity -> Server Config' to change global settings


    +

    Open 'SCCP Connectivity' -> Server Config' to change global settings