Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
O
OpnSense
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Kulya
OpnSense
Commits
984121a6
Commit
984121a6
authored
Feb 16, 2016
by
Ad Schellevis
Committed by
Franco Fichtner
Feb 22, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
(legacy) zap split in pfsense-utils.inc, 3gstats.php, dyn_dns_status.widget.php
(cherry picked from commit
4ab77755
)
parent
6d184870
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
3 additions
and
11 deletions
+3
-11
pfsense-utils.inc
src/etc/inc/pfsense-utils.inc
+0
-8
3gstats.php
src/sbin/3gstats.php
+2
-2
dyn_dns_status.widget.php
src/www/widgets/widgets/dyn_dns_status.widget.php
+1
-1
No files found.
src/etc/inc/pfsense-utils.inc
View file @
984121a6
...
...
@@ -451,14 +451,6 @@ function download_file($url, $destination, $verify_ssl = false, $connect_timeout
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
)
{
global
$config
;
...
...
src/sbin/3gstats.php
View file @
984121a6
...
...
@@ -41,7 +41,7 @@ while (true) {
$string
=
fgets
(
$handle
,
256
);
$elements
=
array
();
$elements
=
split
(
":"
,
$string
);
$elements
=
preg_split
(
":"
,
$string
,
null
);
$elements
[
0
]
=
trim
(
$elements
[
0
]);
$elements
[
1
]
=
trim
(
$elements
[
1
]);
...
...
@@ -60,7 +60,7 @@ while (true) {
break
;
case
"^DSFLOWRPT"
:
$items
=
array
();
$items
=
split
(
","
,
$elements
[
1
]
);
$items
=
preg_split
(
","
,
$elements
[
1
],
null
);
$record
[
'time'
]
=
hexdec
(
$items
[
0
]);
$record
[
'upstream'
]
=
round
((
floatval
(
hexdec
(
$items
[
1
]))
*
8
)
/
1024
);
$record
[
'downstream'
]
=
round
((
floatval
(
hexdec
(
$items
[
2
]))
*
8
)
/
1024
);
...
...
src/www/widgets/widgets/dyn_dns_status.widget.php
View file @
984121a6
...
...
@@ -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
=
split
(
":"
,
file_get_contents
(
$filename
)
);
$cached_ip_s
=
preg_split
(
":"
,
file_get_contents
(
$filename
),
null
);
$cached_ip
=
$cached_ip_s
[
0
];
if
(
$ipaddr
<>
$cached_ip
)
{
echo
"<font color='red'>"
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment