Dashboard - Ring Group Forward: Updates for PHP 8.1
This commit is contained in:
parent
f5a508ed0b
commit
1b460941d5
|
|
@ -63,7 +63,7 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
//update ring group forwarding
|
//update ring group forwarding
|
||||||
if (is_array($_POST['ring_groups']) && @sizeof($_POST['ring_groups']) != 0 && permission_exists('ring_group_forward')) {
|
if (isset($_POST['ring_groups']) && is_array($_POST['ring_groups']) && @sizeof($_POST['ring_groups']) != 0 && permission_exists('ring_group_forward')) {
|
||||||
|
|
||||||
//validate the token
|
//validate the token
|
||||||
$token = new token;
|
$token = new token;
|
||||||
|
|
@ -130,6 +130,11 @@
|
||||||
|
|
||||||
//determine keys and stats
|
//determine keys and stats
|
||||||
unset($stats);
|
unset($stats);
|
||||||
|
|
||||||
|
//set defaults
|
||||||
|
$stats['forwarding'] = 0;
|
||||||
|
$stats['active'] = 0;
|
||||||
|
|
||||||
if (is_array($result) && @sizeof($result) != 0) {
|
if (is_array($result) && @sizeof($result) != 0) {
|
||||||
foreach ($result as $row) {
|
foreach ($result as $row) {
|
||||||
$stats['forwarding'] += $row['ring_group_forward_enabled'] == 'true' && $row['ring_group_forward_destination'] ? 1 : 0;
|
$stats['forwarding'] += $row['ring_group_forward_enabled'] == 'true' && $row['ring_group_forward_destination'] ? 1 : 0;
|
||||||
|
|
@ -137,10 +142,6 @@
|
||||||
$stats['active'] = @sizeof($result) - $stats['forwarding'];
|
$stats['active'] = @sizeof($result) - $stats['forwarding'];
|
||||||
}
|
}
|
||||||
|
|
||||||
//set defaults
|
|
||||||
if ($stats['forwarding'] == null) { $stats['forwarding'] = 0; }
|
|
||||||
if ($stats['active'] == null) { $stats['active'] = 0; }
|
|
||||||
|
|
||||||
//set the row style
|
//set the row style
|
||||||
$c = 0;
|
$c = 0;
|
||||||
$row_style["0"] = "row_style0";
|
$row_style["0"] = "row_style0";
|
||||||
|
|
@ -263,7 +264,7 @@
|
||||||
|
|
||||||
echo "</table>\n";
|
echo "</table>\n";
|
||||||
echo "</div>";
|
echo "</div>";
|
||||||
$n++;
|
//$n++;
|
||||||
|
|
||||||
echo "<input type='hidden' name='".$token['name']."' value='".$token['hash']."'>\n";
|
echo "<input type='hidden' name='".$token['name']."' value='".$token['hash']."'>\n";
|
||||||
echo "</form>\n";
|
echo "</form>\n";
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue