mirror of
https://github.com/lucaspalomodevelop/core.git
synced 2026-03-17 01:54:49 +00:00
src: tweak previous, php can be picky
This commit is contained in:
parent
61cb3745be
commit
93c20e1b69
@ -41,7 +41,7 @@ while (true) {
|
||||
$string = fgets($handle, 256);
|
||||
|
||||
$elements = array();
|
||||
$elements = preg_split(":", $string, null);
|
||||
$elements = preg_split('/:/', $string);
|
||||
$elements[0] = trim($elements[0]);
|
||||
$elements[1] = trim($elements[1]);
|
||||
|
||||
@ -60,7 +60,7 @@ while (true) {
|
||||
break;
|
||||
case "^DSFLOWRPT":
|
||||
$items = array();
|
||||
$items = preg_split(",", $elements[1], null);
|
||||
$items = preg_split('/,/', $elements[1]);
|
||||
$record['time'] = hexdec($items[0]);
|
||||
$record['upstream'] = round((floatval(hexdec($items[1])) * 8) /1024);
|
||||
$record['downstream'] = round((floatval(hexdec($items[2])) * 8) /1024);
|
||||
|
||||
@ -55,7 +55,7 @@ if ($_REQUEST['getdyndnsstatus']) {
|
||||
$filename = "/conf/dyndns_{$dyndns['interface']}{$dyndns['type']}" . escapeshellarg($dyndns['host']) . "{$dyndns['id']}.cache";
|
||||
if (file_exists($filename)) {
|
||||
$ipaddr = dyndnsCheckIP($dyndns['interface']);
|
||||
$cached_ip_s = preg_split(":", file_get_contents($filename), null);
|
||||
$cached_ip_s = preg_split('/:/', file_get_contents($filename));
|
||||
$cached_ip = $cached_ip_s[0];
|
||||
if ($ipaddr <> $cached_ip) {
|
||||
echo "<font color='red'>";
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user