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
Guilherme Filippo
ISPConfig 3
Commits
043a0a32
Commit
043a0a32
authored
Dec 23, 2008
by
fantu
Browse files
replace function deprecated in php 5.3
parent
d4417cdb
Changes
5
Hide whitespace changes
Inline
Side-by-side
interface/lib/classes/tpl_cache.inc.php
View file @
043a0a32
...
...
@@ -161,7 +161,7 @@ class tplc extends tpl {
$filepath
=
dirname
(
$file
);
if
(
is_dir
(
$filepath
))
return
true
;
$dirs
=
split
(
'[\\/]'
,
$filepath
);
$dirs
=
preg_
split
(
'
/
[\\/]
/
'
,
$filepath
);
$currpath
;
foreach
(
$dirs
as
$dir
)
{
$currpath
.
=
$dir
.
'/'
;
...
...
server/lib/classes/file.inc.php
View file @
043a0a32
...
...
@@ -300,13 +300,13 @@ class file{
return
$passed
;
}
if
(
is_string
(
$exts
))
{
if
(
e
reg
i
(
"\."
.
$exts
.
"$"
,
$filename
))
{
if
(
p
reg
_match
(
"
/
\."
.
$exts
.
"$
/i
"
,
$filename
))
{
$passed
=
TRUE
;
return
$passed
;
}
}
else
if
(
is_array
(
$exts
))
{
foreach
(
$exts
as
$theExt
)
{
if
(
e
reg
i
(
"\."
.
$theExt
.
"$"
,
$filename
))
{
if
(
p
reg
_match
(
"
/
\."
.
$theExt
.
"$
/i
"
,
$filename
))
{
$passed
=
TRUE
;
return
$passed
;
}
...
...
server/lib/classes/tpl.inc.php
View file @
043a0a32
...
...
@@ -1193,7 +1193,7 @@ if (!defined('vlibTemplateClassLoaded')) {
switch
(
strtolower
(
$this
->
OPTIONS
[
'UNKNOWNS'
]))
{
case
'comment'
:
$comment
=
addcslashes
(
'<!-- unknown variable '
.
e
reg_replace
(
'<!--|-->'
,
''
,
$wholetag
)
.
'//-->'
,
'"'
);
$comment
=
addcslashes
(
'<!-- unknown variable '
.
p
reg_replace
(
'
/
<!--|-->
/
'
,
''
,
$wholetag
)
.
'//-->'
,
'"'
);
$retstr
.
=
' else { print("'
.
$comment
.
'"); $this->_setUnknown("'
.
$varname
.
'"); }'
;
return
$retstr
;
break
;
...
...
server/lib/classes/tpl_cache.inc.php
View file @
043a0a32
...
...
@@ -82,7 +82,7 @@ class tplc extends tpl {
* @return boolean
*/
function
setCacheExtension
(
$str
=
null
)
{
if
(
$str
==
null
||
!
e
reg
(
'^[a-z0-9]+$'
,
strtolower
(
$str
)))
return
false
;
if
(
$str
==
null
||
!
p
reg
_match
(
'
/
^[a-z0-9]+$
/
'
,
strtolower
(
$str
)))
return
false
;
$this
->
OPTIONS
[
'CACHE_EXTENSION'
]
=
strtolower
(
$str
);
return
true
;
}
...
...
@@ -161,7 +161,7 @@ class tplc extends tpl {
$filepath
=
dirname
(
$file
);
if
(
is_dir
(
$filepath
))
return
true
;
$dirs
=
split
(
'[\\/]'
,
$filepath
);
$dirs
=
preg_
split
(
'
/
[\\/]
/
'
,
$filepath
);
$currpath
;
foreach
(
$dirs
as
$dir
)
{
$currpath
.
=
$dir
.
'/'
;
...
...
server/mods-available/monitor_core_module.inc.php
View file @
043a0a32
...
...
@@ -262,7 +262,7 @@ class monitor_core_module {
$memInfo
=
explode
(
"
\n
"
,
$miData
);
foreach
(
$memInfo
as
$line
){
$part
=
split
(
"
:
"
,
$line
);
$part
=
preg_
split
(
"
/:/
"
,
$line
);
$key
=
trim
(
$part
[
0
]);
$tmp
=
explode
(
" "
,
trim
(
$part
[
1
]));
$value
=
0
;
...
...
@@ -312,7 +312,7 @@ class monitor_core_module {
$cpuInfo
=
explode
(
"
\n
"
,
$cpuData
);
foreach
(
$cpuInfo
as
$line
){
$part
=
split
(
"
:
"
,
$line
);
$part
=
preg_
split
(
"
/:/
"
,
$line
);
$key
=
trim
(
$part
[
0
]);
$value
=
trim
(
$part
[
1
]);
$data
[
$key
]
=
$value
;
...
...
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