Commit 984121a6 authored by Ad Schellevis's avatar Ad Schellevis Committed by Franco Fichtner

(legacy) zap split in pfsense-utils.inc, 3gstats.php, dyn_dns_status.widget.php

(cherry picked from commit 4ab77755)
parent 6d184870
...@@ -451,14 +451,6 @@ function download_file($url, $destination, $verify_ssl = false, $connect_timeout ...@@ -451,14 +451,6 @@ function download_file($url, $destination, $verify_ssl = false, $connect_timeout
return ($http_code == 200) ? true : $http_code; return ($http_code == 200) ? true : $http_code;
} }
/* Split() is being DEPRECATED as of PHP 5.3.0 and REMOVED as of PHP 6.0.0. Relying on this feature is highly discouraged. */
if (!function_exists("split")) {
function split($separator, $haystack, $limit = null) {
log_error("deprecated split() call with separator '{$separator}'");
return preg_split($separator, $haystack, $limit);
}
}
function update_alias_names_upon_change($section, $field, $new_alias_name, $origname) function update_alias_names_upon_change($section, $field, $new_alias_name, $origname)
{ {
global $config; global $config;
......
...@@ -41,7 +41,7 @@ while (true) { ...@@ -41,7 +41,7 @@ while (true) {
$string = fgets($handle, 256); $string = fgets($handle, 256);
$elements = array(); $elements = array();
$elements = split(":", $string); $elements = preg_split(":", $string, null);
$elements[0] = trim($elements[0]); $elements[0] = trim($elements[0]);
$elements[1] = trim($elements[1]); $elements[1] = trim($elements[1]);
...@@ -60,7 +60,7 @@ while (true) { ...@@ -60,7 +60,7 @@ while (true) {
break; break;
case "^DSFLOWRPT": case "^DSFLOWRPT":
$items = array(); $items = array();
$items = split(",", $elements[1]); $items = preg_split(",", $elements[1], null);
$record['time'] = hexdec($items[0]); $record['time'] = hexdec($items[0]);
$record['upstream'] = round((floatval(hexdec($items[1])) * 8) /1024); $record['upstream'] = round((floatval(hexdec($items[1])) * 8) /1024);
$record['downstream'] = round((floatval(hexdec($items[2])) * 8) /1024); $record['downstream'] = round((floatval(hexdec($items[2])) * 8) /1024);
......
...@@ -55,7 +55,7 @@ if ($_REQUEST['getdyndnsstatus']) { ...@@ -55,7 +55,7 @@ if ($_REQUEST['getdyndnsstatus']) {
$filename = "/conf/dyndns_{$dyndns['interface']}{$dyndns['type']}" . escapeshellarg($dyndns['host']) . "{$dyndns['id']}.cache"; $filename = "/conf/dyndns_{$dyndns['interface']}{$dyndns['type']}" . escapeshellarg($dyndns['host']) . "{$dyndns['id']}.cache";
if (file_exists($filename)) { if (file_exists($filename)) {
$ipaddr = dyndnsCheckIP($dyndns['interface']); $ipaddr = dyndnsCheckIP($dyndns['interface']);
$cached_ip_s = split(":", file_get_contents($filename)); $cached_ip_s = preg_split(":", file_get_contents($filename), null);
$cached_ip = $cached_ip_s[0]; $cached_ip = $cached_ip_s[0];
if ($ipaddr <> $cached_ip) { if ($ipaddr <> $cached_ip) {
echo "<font color='red'>"; echo "<font color='red'>";
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment