Code cleanup and reformatting
This commit is contained in:
parent
f6a36ad9ce
commit
47f1cee519
8 changed files with 207 additions and 214 deletions
|
@ -18,7 +18,6 @@
|
|||
<tbody>
|
||||
<?php
|
||||
error_reporting(E_ERROR | E_WARNING | E_PARSE);
|
||||
//include "./functions.php";
|
||||
try{
|
||||
$datas = array();
|
||||
if (!(exec('/bin/df -T | awk -v c=`/bin/df -T | grep -bo "Type" | awk -F: \'{print $2}\'` \'{print substr($0,c);}\' | tail -n +2 | awk \'{print $1","$2","$3","$4","$5","$6","$7}\'', $df))) {
|
||||
|
|
|
@ -192,7 +192,6 @@ function showMode($mode, $mmdvmconfigs) {
|
|||
function getMMDVMLog() {
|
||||
// Open Logfile and copy loglines into LogLines-Array()
|
||||
$logPath = MMDVMLOGPATH."/".MMDVMLOGPREFIX."-".date("Y-m-d").".log";
|
||||
//$logLines = explode("\n", `grep M: $logPath`);
|
||||
$logLines = explode("\n", `egrep -h "from|end|watchdog|lost" $logPath`);
|
||||
return $logLines;
|
||||
}
|
||||
|
@ -201,14 +200,12 @@ function getShortMMDVMLog() {
|
|||
// Open Logfile and copy loglines into LogLines-Array()
|
||||
$logPath = MMDVMLOGPATH."/".MMDVMLOGPREFIX."-".date("Y-m-d").".log";
|
||||
$logLines = explode("\n", `egrep -h "from|end|watchdog|lost|Alias|0000" $logPath | grep -v "data header" | tail -20`);
|
||||
|
||||
return $logLines;
|
||||
}
|
||||
|
||||
function getYSFGatewayLog() {
|
||||
// Open Logfile and copy loglines into LogLines-Array()
|
||||
$logPath = YSFGATEWAYLOGPATH."/".YSFGATEWAYLOGPREFIX."-".date("Y-m-d").".log";
|
||||
//$logLines = explode("\n", `egrep -h "D:|M:" $logPath`);
|
||||
$logLines = explode("\n", `egrep -h "repeater|Starting|Disconnect|Connect|Automatic|Disconnecting|Reverting" $logPath`);
|
||||
return $logLines;
|
||||
}
|
||||
|
@ -503,7 +500,6 @@ function getLastHeard($logLines, $onlyLast) {
|
|||
array_push($heardCalls, $listElem[2]."#".$listElem[1].$listElem[4]);
|
||||
if (defined("ENABLEXTDLOOKUP")) {
|
||||
if ($listElem[2] !== "??????????") {
|
||||
//$listElem[3] = "Dummy"; //Should speed up this function - time-issue!
|
||||
$listElem[3] = getName($call_canon); //Should speed up this function - time-issue!
|
||||
} else {
|
||||
$listElem[3] = "---";
|
||||
|
@ -534,7 +530,6 @@ function getActualMode($metaLastHeard, $mmdvmconfigs) {
|
|||
// returns mode of repeater actual working in
|
||||
$listElem = $metaLastHeard[0];
|
||||
$timestamp = new DateTime($listElem[0],new DateTimeZone(TIMEZONE));
|
||||
|
||||
$mode = $listElem[1];
|
||||
if (startsWith($mode, "DMR")) {
|
||||
$mode = "DMR";
|
||||
|
|
|
@ -16,7 +16,6 @@ if (defined("ENABLEYSFGATEWAY")) {
|
|||
$logLinesYSFGateway = getYSFGatewayLog();
|
||||
showLapTime("getYSFGatewayLog");
|
||||
$reverseLogLinesYSFGateway = $logLinesYSFGateway;
|
||||
//array_multisort($reverseLogLinesYSFGateway,SORT_DESC);
|
||||
rsort($reverseLogLinesYSFGateway);
|
||||
showLapTime("array_multisort");
|
||||
$activeYSFReflectors = getActiveYSFReflectors();
|
||||
|
|
Loading…
Reference in a new issue