- Bug Fix

This commit is contained in:
PhantomVl 2019-05-22 08:47:28 +03:00
parent 8bfc08beaa
commit cf54bb400a
3 changed files with 35 additions and 36 deletions

View file

@ -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');
}

View file

@ -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();

View file

@ -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('<br><br>');
$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'] = '<div class="alert signature alert-danger"> Reinstall SCCP manager required</div>';
}
}
if ($db_Schema == 0) {
$info['DB_Schema'] = array('Version' => 'Error', 'about'=> '<div class="alert signature alert-danger"> ERROR DB Version </div>');
} 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 .= '<div class="alert signature alert-danger"> Error : '. $value['message']. '</div>';
@ -145,9 +143,9 @@ print_r("<br> Help Info:<br><pre>");
foreach ($this->info_warning as $key => $value) {
echo '<h3>'.$key.'</h3>';
if (is_array($value)) {
echo '<li>'.implode('</li><li>',$value).'</li>';
echo '<li>'.implode('</li><li>', $value).'</li>';
} else {
echo '<li>'.$value.'</li>';
echo '<li>'. _($value).'</li>';
}
}
?>
@ -165,13 +163,13 @@ if (!empty($this->class_error)) {
<div class="fpbx-container container-fluid">
<div class="row">
<div class="container">
<h2 style="border:2px solid Tomato;color:Tomato;" >Sccp Manager Error</h2>
<h2 style="border:2px solid Tomato;color:Tomato;" >Diagnostic information about SCCP Manager errors</h2>
<div class="table-responsive">
<br> There are Error in the SCCP Module:<br><pre>
<br> There is an error in the :<br><pre>
<?php print_r($this->class_error); ?>
</pre>
<br> Correct these problems before continuing to work. <br>
<br><h3 style="border:2px solid Tomato;color:Green;" > Open 'SCCP Conectivity -> Server Config' to change global settings</h3> <br>
<br><h3 style="border:2px solid Tomato;color:Green;" > Open 'SCCP Connectivity' -> Server Config' to change global settings</h3> <br>
</div>
</div>
</div>