Distinguish between MMDVM and MMDVM_HS firmware links

This commit is contained in:
phl0 2017-08-21 14:20:34 +02:00
parent 64ea3e1622
commit 87ad782e5e
No known key found for this signature in database
GPG key ID: 48EA1E640798CA9A

View file

@ -58,7 +58,11 @@ function getFirmwareVersion() {
$firmware = "n/a";
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);
if (0 === strpos($firmware, 'MMDVM')) {
$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);
} else if (0 === strpos($firmware, 'ZUMspot')) {
$firmware = preg_replace('/GitID #([0-9A-Fa-f]{7})/', 'GitID #<a href="http://www.github.com/juribeparada/MMDVM_HS/commit/$1" target=\"_blank\">$1</a>', $firmware);
}
}
if ($firmware != "n/a") {
$fp = fopen('/tmp/MMDVMFirmware.txt', 'w');