diff -r b29f80afaeac -r fb930d1db5a6 www-thermferm/utilities.php --- a/www-thermferm/utilities.php Wed Aug 20 13:10:10 2014 +0200 +++ b/www-thermferm/utilities.php Wed Aug 20 13:51:44 2014 +0200 @@ -113,6 +113,23 @@ +/* + * @param array $command to send to the server. + * Return: 0 = Ok. + * 1 = Server responden with an error. + */ +function send_array_check($command) +{ + $answer = send_array($command); + + if (strlen($answer) && (($answer[0] == '1') || ($answer[0] == '2'))) + return 0; + + return 1; +} + + + function startsWith($haystack, $needle) { return !strncmp($haystack, $needle, strlen($needle));