Link to github for firmware version

This commit is contained in:
phl0 2017-04-12 15:40:43 +02:00
parent 757108b2e0
commit 349fb66151
No known key found for this signature in database
GPG key ID: 48EA1E640798CA9A

View file

@ -32,6 +32,7 @@ function getFirmwareVersion() {
$firmware = "n/a"; $firmware = "n/a";
if (count($logLines) >= 2) { if (count($logLines) >= 2) {
$firmware = substr($logLines[count($logLines)-2], strpos($logLines[count($logLines)-2], "description")+13, strlen($logLines[count($logLines)-2])-strpos($logLines[count($logLines)-2], "description")+13); $firmware = substr($logLines[count($logLines)-2], strpos($logLines[count($logLines)-2], "description")+13, strlen($logLines[count($logLines)-2])-strpos($logLines[count($logLines)-2], "description")+13);
$firmware = preg_replace('/GitID #([0-9A-Fa-f]{7})/', 'GitID #<a href="http://www.github.com/g4klx/MMDVM/commit/$1" target=\"_blank\">$1</a>', $firmware);
} }
if ($firmware != "n/a") { if ($firmware != "n/a") {
$fp = fopen('/tmp/MMDVMFirmware.txt', 'w'); $fp = fopen('/tmp/MMDVMFirmware.txt', 'w');