Added debug to discovery protocols + stop them running if not configured

This commit is contained in:
laf
2015-08-02 19:23:54 +00:00
parent 3a36fc8974
commit 741742aa85
2 changed files with 78 additions and 61 deletions

View File

@@ -580,7 +580,12 @@ function edit_service($service, $descr, $service_ip, $service_param = "", $servi
function d_echo($text, $no_debug_text = null) {
global $debug;
if ($debug) {
echo "$text";
if (is_array($text)) {
print_r($text);
}
else {
echo "$text";
}
}
elseif ($no_debug_text) {
echo "$no_debug_text";