Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Tommaso Perondi
ISPConfig 3
Commits
2fc824fe
Commit
2fc824fe
authored
Oct 16, 2019
by
Till Brehm
Browse files
Changed PHP syntax in monitor_tools.inc.php for PHP 5.3 compatibility.
parent
7d41f01a
Changes
1
Hide whitespace changes
Inline
Side-by-side
server/lib/classes/monitor_tools.inc.php
View file @
2fc824fe
...
@@ -254,7 +254,7 @@ class monitor_tools {
...
@@ -254,7 +254,7 @@ class monitor_tools {
preg_match_all
(
'/NAME=\"([\w ]+)\"/m'
,
$content
,
$name
);
preg_match_all
(
'/NAME=\"([\w ]+)\"/m'
,
$content
,
$name
);
preg_match_all
(
'/VERSION_ID=\"([0-9]{1,2})\.?([0-9]{0,2})\.?([0-9]*).$/m'
,
$content
,
$version
);
preg_match_all
(
'/VERSION_ID=\"([0-9]{1,2})\.?([0-9]{0,2})\.?([0-9]*).$/m'
,
$content
,
$version
);
$distname
=
is_array
(
$name
)
?
$name
[
1
][
0
]
:
'openSUSE'
;
$distname
=
is_array
(
$name
)
?
$name
[
1
][
0
]
:
'openSUSE'
;
$distver
=
is_array
(
$version
)
?
implode
(
'.'
,
array_filter
(
[
$version
[
1
][
0
],
$version
[
2
][
0
],
$version
[
3
][
0
]
]
,
'strlen'
))
:
'Unknown'
;
$distver
=
is_array
(
$version
)
?
implode
(
'.'
,
array_filter
(
array
(
$version
[
1
][
0
],
$version
[
2
][
0
],
$version
[
3
][
0
]
)
,
'strlen'
))
:
'Unknown'
;
$distid
=
'opensuse112'
;
$distid
=
'opensuse112'
;
$distbaseid
=
'opensuse'
;
$distbaseid
=
'opensuse'
;
}
else
{
}
else
{
...
@@ -309,7 +309,7 @@ class monitor_tools {
...
@@ -309,7 +309,7 @@ class monitor_tools {
}
elseif
(
stristr
(
$content
,
'CentOS Linux release 7'
))
{
}
elseif
(
stristr
(
$content
,
'CentOS Linux release 7'
))
{
preg_match_all
(
'/([0-9]{1,2})\.?([0-9]{0,2})\.?([0-9]*)/'
,
$content
,
$version
);
preg_match_all
(
'/([0-9]{1,2})\.?([0-9]{0,2})\.?([0-9]*)/'
,
$content
,
$version
);
$distname
=
'CentOS'
;
$distname
=
'CentOS'
;
$distver
=
is_array
(
$version
)
?
implode
(
'.'
,
array_filter
(
[
$version
[
1
][
0
],
$version
[
2
][
0
],
$version
[
3
][
0
]
]
,
'strlen'
))
:
'Unknown'
;
$distver
=
is_array
(
$version
)
?
implode
(
'.'
,
array_filter
(
array
(
$version
[
1
][
0
],
$version
[
2
][
0
],
$version
[
3
][
0
]
)
,
'strlen'
))
:
'Unknown'
;
$distbaseid
=
'fedora'
;
$distbaseid
=
'fedora'
;
$var
=
explode
(
" "
,
$content
);
$var
=
explode
(
" "
,
$content
);
$var
=
explode
(
"."
,
$var
[
3
]);
$var
=
explode
(
"."
,
$var
[
3
]);
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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