Remove ereg
parent
6610295909
commit
291fcf3a85
|
@ -941,7 +941,7 @@ function fof_init_plugins()
|
||||||
while ($file = readdir($dirlist))
|
while ($file = readdir($dirlist))
|
||||||
{
|
{
|
||||||
fof_log("considering " . $file);
|
fof_log("considering " . $file);
|
||||||
if (ereg('\.php$',$file) &&
|
if (substr($file, -4) == '.php' &&
|
||||||
is_readable(FOF_DIR . "/plugins/" . $file) &&
|
is_readable(FOF_DIR . "/plugins/" . $file) &&
|
||||||
!$p->get('plugin_' . substr($file, 0, -4)))
|
!$p->get('plugin_' . substr($file, 0, -4)))
|
||||||
{
|
{
|
||||||
|
|
|
@ -146,7 +146,7 @@ if(isset($_POST['plugins']))
|
||||||
$plugins = array();
|
$plugins = array();
|
||||||
$dirlist = opendir(FOF_DIR . "/plugins");
|
$dirlist = opendir(FOF_DIR . "/plugins");
|
||||||
while($file=readdir($dirlist))
|
while($file=readdir($dirlist))
|
||||||
if(ereg('\.php$',$file))
|
if(substr($file, -4) == '.php')
|
||||||
$plugins[] = substr($file, 0, -4);
|
$plugins[] = substr($file, 0, -4);
|
||||||
|
|
||||||
closedir();
|
closedir();
|
||||||
|
|
|
@ -102,7 +102,7 @@ foreach($result as $item)
|
||||||
$item_link = htmlspecialchars($item['item_link']);
|
$item_link = htmlspecialchars($item['item_link']);
|
||||||
|
|
||||||
$item_guid = $item['item_guid'];
|
$item_guid = $item['item_guid'];
|
||||||
if(!ereg("^[a-z0-9\.\+\-]+:", $item_guid))
|
if (!preg_match("/^[a-z0-9\.\+\-]+:/", $item_guid))
|
||||||
$item_guid = $feed_link . '#' . $item_guid;
|
$item_guid = $feed_link . '#' . $item_guid;
|
||||||
$item_guid = htmlspecialchars($item_guid);
|
$item_guid = htmlspecialchars($item_guid);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue