Skip to content
This repository was archived by the owner on Sep 13, 2024. It is now read-only.

Commit 532ff6a

Browse files
committed
Fixing for new version of pYSFReflector
1 parent 0a71bb7 commit 532ff6a

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

include/functions.php

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -192,8 +192,11 @@ function getHeardList($logLines) {
192192
}
193193
$callsign2 = substr($logLine, strpos($logLine,"from") + 5, strpos($logLine,"to") - strpos($logLine,"from") - 6);
194194
$callsign = trim($callsign2);
195-
$target = substr($logLine, strpos($logLine, "to") + 3, strpos($logLine,"at") - strpos($logLine,"to") +6 );
196-
$gateway = substr($logLine, strrpos($logLine,"at") + 3);
195+
$target = substr($logLine, strpos($logLine, " to ") + 4, strpos($logLine," at ") - strpos($logLine, " to ") - 3);
196+
$gateway = substr($logLine, strrpos($logLine," at ") + 4);
197+
if (strpos($gateway, "FICH") == true) {
198+
$gateway = substr($gateway, 0, strpos($gateway, "FICH"));
199+
}
197200
// Callsign or ID should be less than 11 chars long, otherwise it could be errorneous
198201
if ( strlen($callsign) < 11 ) {
199202
array_push($heardList, array(convertTimezone($timestamp), $callsign, $target, $gateway, $duration));

0 commit comments

Comments
 (0)