Skip to content
Permalink
Browse files
Merge pull request #689 from Alexandr-logrus/alpha
small fix
  • Loading branch information
sergejey committed Feb 16, 2020
2 parents 8819513 + 36ea914 commit 8ea6ee3a5786d7672c08dd0a124adf0865623957
Showing 2 changed files with 20 additions and 9 deletions.
@@ -54,14 +54,25 @@

if ($rec['TYPE'] == 'plusminus' || $rec['TYPE'] == 'sliderbox') {
global $min_value;
if ($min_value != '') { $rec['MIN_VALUE'] = $min_value; }
else { $rec['MIN_VALUE'] = 0; }
if ($min_value != '') {
$rec['MIN_VALUE'] = $min_value;
} else {
$rec['MIN_VALUE'] = 0;
}

global $max_value;
if ($max_value != '') { $rec['MAX_VALUE'] = $max_value; }
else { $rec['MAX_VALUE'] = 0; }
if ($max_value != '') {
$rec['MAX_VALUE'] = $max_value;
} else {
$rec['MAX_VALUE'] = 0;
}

global $step_value;
if ($$step_value != '') { $rec['STEP_VALUE'] = $step_value; }
else { $rec['STEP_VALUE'] = 0; }
if ($step_value != '') {
$rec['STEP_VALUE'] = $step_value;
} else {
$rec['STEP_VALUE'] = 0;
}
}

global $delete_icon;
@@ -6,15 +6,15 @@
$total = count($rooms);
for ($i = 0; $i < $total; $i++) {
$rooms[$i]['room'] = getGlobal($rooms[$i]['TITLE'] . '.Title');
if (!$rooms[$i]['room']) {
if ($rooms[$i]['room'] == '') {
$rooms[$i]['room'] = $rooms[$i]['TITLE'];
}
$rooms[$i]['active'] = getGlobal($rooms[$i]['TITLE'] . '.SomebodyHere');
$rooms[$i]['time'] = getGlobal($rooms[$i]['TITLE'] . '.LatestActivity');
$rooms[$i]['time'] = (int)getGlobal($rooms[$i]['TITLE'] . '.LatestActivity');
if (!$rooms[$i]['time']) {
$rooms[$i]['time'] = 0;
}
$rooms[$i]['diff'] = time() - (int)$rooms[$i]['time'];
$rooms[$i]['diff'] = time() - $rooms[$i]['time'];
}

usort($rooms, function ($a,$b) {

0 comments on commit 8ea6ee3

Please sign in to comment.