Cleaned up messages
Improved message readability. Atom removed extraneous white spaces and lines
This commit is contained in:
parent
80fbf7b1b4
commit
48041fc62c
|
@ -72,7 +72,6 @@ abstract class Response extends IncomingMessage
|
||||||
$this->setKey('ActionId', $actionId);
|
$this->setKey('ActionId', $actionId);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public function getVariable($_rawContent, $_fields = '')
|
public function getVariable($_rawContent, $_fields = '')
|
||||||
{
|
{
|
||||||
$lines = explode(Message::EOL, $_rawContent);
|
$lines = explode(Message::EOL, $_rawContent);
|
||||||
|
@ -119,7 +118,6 @@ class Login_Response extends Response
|
||||||
class Command_Response extends Response
|
class Command_Response extends Response
|
||||||
{
|
{
|
||||||
private $_temptable;
|
private $_temptable;
|
||||||
|
|
||||||
public function __construct($rawContent)
|
public function __construct($rawContent)
|
||||||
{
|
{
|
||||||
// print_r('<br>---- r --<br>');
|
// print_r('<br>---- r --<br>');
|
||||||
|
@ -127,7 +125,6 @@ class Command_Response extends Response
|
||||||
// print_r('<br>---- re --<br>');
|
// print_r('<br>---- re --<br>');
|
||||||
$this->_temptable = array();
|
$this->_temptable = array();
|
||||||
parent::__construct($rawContent);
|
parent::__construct($rawContent);
|
||||||
|
|
||||||
$lines = explode(Message::EOL, $rawContent);
|
$lines = explode(Message::EOL, $rawContent);
|
||||||
foreach ($lines as $line) {
|
foreach ($lines as $line) {
|
||||||
$content = explode(':', $line);
|
$content = explode(':', $line);
|
||||||
|
|
|
@ -464,14 +464,14 @@ class extconfigs
|
||||||
$res['extconfig'] = 'OK';
|
$res['extconfig'] = 'OK';
|
||||||
|
|
||||||
if (empty($res['sccpdevice'])) {
|
if (empty($res['sccpdevice'])) {
|
||||||
$res['extconfig'] = ' Options "Sccpdevice" not config ';
|
$res['extconfig'] = ' Option "Sccpdevice" is not configured ';
|
||||||
}
|
}
|
||||||
if (empty($res['sccpline'])) {
|
if (empty($res['sccpline'])) {
|
||||||
$res['extconfig'] = ' Options "Sccpline" not config ';
|
$res['extconfig'] = ' Option "Sccpline" is not configured ';
|
||||||
}
|
}
|
||||||
|
|
||||||
if (empty($res['extconfigfile'])) {
|
if (empty($res['extconfigfile'])) {
|
||||||
$res['extconfig'] = 'File extconfig.conf not exist';
|
$res['extconfig'] = 'File extconfig.conf does not exist';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -483,10 +483,10 @@ class extconfigs
|
||||||
if (file_exists($dir . '/res_mysql.conf')) {
|
if (file_exists($dir . '/res_mysql.conf')) {
|
||||||
$res_conf = $cnf_read->getConfig('res_mysql.conf');
|
$res_conf = $cnf_read->getConfig('res_mysql.conf');
|
||||||
if (empty($res_conf[$realm])) {
|
if (empty($res_conf[$realm])) {
|
||||||
$res['mysqlconfig'] = 'Not Config in file: res_mysql.conf';
|
$res['mysqlconfig'] = 'Config not found in file: res_mysql.conf';
|
||||||
} else {
|
} else {
|
||||||
if ($res_conf[$realm]['dbsock'] != $def_bd_config['dbsock']) {
|
if ($res_conf[$realm]['dbsock'] != $def_bd_config['dbsock']) {
|
||||||
$res['mysqlconfig'] = 'Mysql Soket Error in file: res_mysql.conf';
|
$res['mysqlconfig'] = 'Mysql Socket Error in file: res_mysql.conf';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (empty($res['mysqlconfig'])) {
|
if (empty($res['mysqlconfig'])) {
|
||||||
|
@ -500,7 +500,7 @@ class extconfigs
|
||||||
$res['mysqlconfig'] = 'Not Config in file: res_config_mysql.conf';
|
$res['mysqlconfig'] = 'Not Config in file: res_config_mysql.conf';
|
||||||
} else {
|
} else {
|
||||||
if ($res_conf[$realm]['dbsock'] != $def_bd_config['dbsock']) {
|
if ($res_conf[$realm]['dbsock'] != $def_bd_config['dbsock']) {
|
||||||
$res['mysqlconfig'] = 'Mysql Soket Error in file: res_config_mysql.conf';
|
$res['mysqlconfig'] = 'Mysql Socket Error in file: res_config_mysql.conf';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (empty($res['mysqlconfig'])) {
|
if (empty($res['mysqlconfig'])) {
|
||||||
|
|
|
@ -14,6 +14,7 @@ $ast_realtime = $this->srvinterface->sccp_realtime_status();
|
||||||
|
|
||||||
$ast_realm = (empty($ast_realtime['sccp']) ? '' : 'sccp');
|
$ast_realm = (empty($ast_realtime['sccp']) ? '' : 'sccp');
|
||||||
|
|
||||||
|
// if there are multiple connections, this will only return the first.
|
||||||
foreach ($ast_realtime as $key => $value) {
|
foreach ($ast_realtime as $key => $value) {
|
||||||
if (empty($ast_realm)) {
|
if (empty($ast_realm)) {
|
||||||
if ($value['status'] == 'OK') {
|
if ($value['status'] == 'OK') {
|
||||||
|
@ -61,7 +62,7 @@ if ($db_Schema == 0) {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (empty($ast_realtime)) {
|
if (empty($ast_realtime)) {
|
||||||
$info['RealTime'] = array('Version' => 'Error', 'about' => '<div class="alert signature alert-danger"> No found Real Time connections</div>');
|
$info['RealTime'] = array('Version' => 'Error', 'about' => '<div class="alert signature alert-danger"> No RealTime connections found</div>');
|
||||||
} else {
|
} else {
|
||||||
$rt_info = '';
|
$rt_info = '';
|
||||||
$rt_sccp = 'Failed';
|
$rt_sccp = 'Failed';
|
||||||
|
@ -82,7 +83,7 @@ if (empty($ast_realtime)) {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (empty($conf_realtime)) {
|
if (empty($conf_realtime)) {
|
||||||
$info['ConfigsRealTime'] = array('Version' => 'Error', 'about' => '<div class="alert signature alert-danger"> No found Real Time Configs</div>');
|
$info['ConfigsRealTime'] = array('Version' => 'Error', 'about' => '<div class="alert signature alert-danger"> Realtime configuration was not found</div>');
|
||||||
} else {
|
} else {
|
||||||
$rt_info = '';
|
$rt_info = '';
|
||||||
foreach ($conf_realtime as $key => $value) {
|
foreach ($conf_realtime as $key => $value) {
|
||||||
|
@ -517,4 +518,3 @@ foreach ($info as $key => $value) {
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<?php echo $this->showGroup('sccp_info', 0); ?>
|
<?php echo $this->showGroup('sccp_info', 0); ?>
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue