Skip to content
GitLab
Explore
Sign in
Register
Commits on Source (2)
Replace ereg* deprecated functions with preg* ones
· 56572b84
Simon Latapie
authored
Feb 09, 2018
56572b84
Merge branch 'master' of
https://code.videolan.org/VideoLAN.org/websites
· a3910a60
Simon Latapie
authored
Feb 09, 2018
a3910a60
Hide whitespace changes
Inline
Side-by-side
www.videolan.org/include/magpierss/rss_parse.inc
View file @
a3910a60
...
...
@@ -150,7 +150,7 @@ class MagpieRSS {
// check for a namespace, and split if found
$ns
=
false
;
if
(
strpos
(
$element
,
':'
)
)
{
list
(
$ns
,
$el
)
=
split
(
'
:
'
,
$element
,
2
);
list
(
$ns
,
$el
)
=
preg_
split
(
'
/:/
'
,
$element
,
2
);
}
if
(
$ns
and
$ns
!=
'rdf'
)
{
$this
->
current_namespace
=
$ns
;
...
...
www.videolan.org/include/news.php
View file @
a3910a60
...
...
@@ -40,13 +40,13 @@
while
(
!
feof
(
$file
)
)
{
$line
=
e
reg_replace
(
"
\n
"
,
""
,
fgets
(
$file
,
4096
));
$line
=
p
reg_replace
(
"
/
\n
/
"
,
""
,
fgets
(
$file
,
4096
));
// Comments are allowed
if
(
!
e
reg
(
"^ *#"
,
$line
)
&&
!
e
reg
(
"^ *$"
,
$line
)
)
if
(
!
p
reg
_match
(
"
/
^ *#
/
"
,
$line
)
&&
!
p
reg
_match
(
"
/
^ *$
/
"
,
$line
)
)
{
// Topics start with "|"
if
(
e
reg
(
"^ *\|"
,
$line
)
&&
$msg
)
if
(
p
reg
_match
(
"
/
^ *\|
/
"
,
$line
)
&&
$msg
)
{
$ex
=
explode
(
"|"
,
$msg
);
$date
=
$ex
[
1
];
...
...
www.videolan.org/news-rss.php
View file @
a3910a60
...
...
@@ -25,13 +25,13 @@
while
(
!
feof
(
$file
)
)
{
$line
=
e
reg_replace
(
"
\n
"
,
""
,
fgets
(
$file
,
4096
));
$line
=
p
reg_replace
(
"
/
\n
/
"
,
""
,
fgets
(
$file
,
4096
));
// Comments are allowed
if
(
!
e
reg
(
"^ *#"
,
$line
)
&&
!
e
reg
(
"^ *$"
,
$line
)
)
if
(
!
p
reg
_match
(
"
/
^ *#
/
"
,
$line
)
&&
!
p
reg
_match
(
"
/
^ *$
/
"
,
$line
)
)
{
// Topics start with "|"
if
(
e
reg
(
"^ *\|"
,
$line
)
&&
$msg
)
if
(
p
reg
_match
(
"
/
^ *\|
/
"
,
$line
)
&&
$msg
)
{
$ex
=
explode
(
"|"
,
$msg
);
$date
=
$ex
[
1
];
...
...
www.videolan.org/videolan/team/index.php
View file @
a3910a60
...
...
@@ -33,10 +33,10 @@ part with '@'. </p>
global
$count
,
$file
;
if
(
$count
>=
count
(
$file
)
)
return
(
''
);
$line
=
e
reg_replace
(
"
\n
"
,
''
,
$file
[
$count
]);
$line
=
p
reg_replace
(
"
/
\n
/
"
,
''
,
$file
[
$count
]);
$count
++
;
if
(
e
reg
(
'^[ #]+'
,
$line
)
)
return
(
''
);
if
(
p
reg
_match
(
'
/
^[ #]+
/
'
,
$line
)
)
return
(
''
);
return
htmlspecialchars
(
$line
);
}
...
...
@@ -103,7 +103,7 @@ part with '@'. </p>
$handle
=
opendir
(
'.'
);
while
(
false
!=
(
$f
=
readdir
(
$handle
)))
{
if
(
e
reg
(
"AUTHORS.vlc"
,
$f
))
{
if
(
p
reg
_match
(
"
/
AUTHORS.vlc
/
"
,
$f
))
{
$file
=
file
(
$f
);
foreach
(
$file
as
$line
)
{
?>
<p>
<?php
...
...
@@ -111,7 +111,7 @@ part with '@'. </p>
?>
</p>
<?php
}
}
else
if
(
e
reg
(
"AUTHORS"
,
$f
))
{
else
if
(
p
reg
_match
(
"
/
AUTHORS
/
"
,
$f
))
{
parselist
(
substr
(
$f
,
8
));
}
}
...
...