Revision 727ed08b
Added by Christian McDonald over 2 years ago
src/etc/inc/shaper.inc | ||
---|---|---|
33 | 33 |
require_once("notices.inc"); |
34 | 34 |
include_once("interfaces.inc");//required for convert_real_interface_to_friendly_interface_name() in get_queue_stats() to get altq interface name. |
35 | 35 |
|
36 |
// Try to ceil $value, otherwise return $default is unable to do so |
|
37 |
function ceil2($value, $default = NULL) |
|
38 |
{ |
|
39 |
return (is_numeric($value) ? ceil($value) : $default); |
|
40 |
} |
|
41 |
|
|
36 | 42 |
/* Limiter patch */ |
37 | 43 |
// I need this crazy looking model/struct to specify various algos, ecn caps, and params. |
38 | 44 |
// update as needed when dummynet changes |
... | ... | |
4367 | 4373 |
foreach ($bandwidth as $bwidx => $bw) { |
4368 | 4374 |
$form .= '<tr>'; |
4369 | 4375 |
$form .= '<td class="col-xs-4">'; |
4370 |
$form .= "<input class='form-control' onchange=\"ceil_func(this)\" type=\"number\" id=\"bandwidth{$bwidx}\" name=\"bandwidth{$bwidx}\" value=\"" . ceil($bw['bw']) ."\" min=\"0\" step=\"1\"/>"; |
|
4376 |
$form .= "<input class='form-control' onchange=\"ceil_func(this)\" type=\"number\" id=\"bandwidth{$bwidx}\" name=\"bandwidth{$bwidx}\" value=\"" . ceil2($bw['bw']) ."\" min=\"0\" step=\"1\"/>";
|
|
4371 | 4377 |
//$form .= "</td><td width='20%'>"; |
4372 | 4378 |
//$form .= "<input class='formfld unknown' size='10' type=\"text\" id=\"burst{$bwidx}\" name=\"burst{$bwidx}\" value=\"{$bw['burst']}\" />"; |
4373 | 4379 |
$form .= "</td>"; |
Also available in: Unified diff
Fix shaper.inc for PHP81. For #13553