Skip to content
Permalink
Browse files

Merge pull request #601 from tarasfrompir/patch-4

add function setTerminalMML
  • Loading branch information...
sergejey committed Aug 20, 2019
2 parents 1a74aa7 + 6a21e98 commit 5a0f499b0b2e839a0e53860bed4d21f37177ec4b
Showing with 21 additions and 0 deletions.
  1. +21 −0 lib/terminals.class.php
@@ -336,3 +336,24 @@ function setPlayerVolume($host = 'localhost', $level = 0)
return $player->json['message'];
}
function setTerminalMML($host = 'localhost', $mml=0) {
if (!$terminal = getTerminalsByName($host, 1)[0]) {
$terminal = getTerminalsByHost($host, 1)[0];
}
if (!$terminal['ID']) {
$terminal = getTerminalsCanPlay(1)[0];
}
if (!$terminal['ID']) {
$terminal = getMainTerminal();
}
if (!$terminal['ID']) {
$terminal = getAllTerminals(1)[0];
}
if (!$terminal['ID']) {
return 0;
}
$terminal['MIN_MSG_LEVEL'] = $mml;
SQLUpdate('terminals', $terminal);
return true;
}

0 comments on commit 5a0f499

Please sign in to comment.
You can’t perform that action at this time.