Change version output to work with -v command line argument (#12)

Pull Request #70 on MMDVMHost

To be honest, thinking about it, I don't think you need the 2>&1 now as I coded the version output to be printed to STDERR - one for you to test ;-)
This commit is contained in:
Tony Corbett 2016-05-15 18:05:52 +03:00 committed by Kim - DG9VH
parent 749d3cb5e7
commit 4b0e7027bf

View file

@ -3,8 +3,8 @@
function getMMDVMHostVersion() {
// returns creation-time of MMDVMHost as version-number
$filename = MMDVMHOSTPATH . "MMDVMHost";
exec($filename." 2>&1", $output);
return substr($output[1],10,8)." (compiled ".getMMDVMHostFileVersion().")";
exec($filename." -v 2>&1", $output);
return substr($output[0],18,8)." (compiled ".getMMDVMHostFileVersion().")";
}
function getMMDVMHostFileVersion() {
@ -400,4 +400,4 @@ function getActualReflector($logLines, $mode) {
$mmdvmconfigs = getMMDVMConfig();
$logLines = getLog();
$lastHeard = getLastHeard($logLines);
?>
?>