Remove ereg

master
Vitaliy Filippov 2017-09-21 13:17:54 +03:00
parent 6610295909
commit 291fcf3a85
3 changed files with 3 additions and 3 deletions

View File

@ -941,7 +941,7 @@ function fof_init_plugins()
while ($file = readdir($dirlist))
{
fof_log("considering " . $file);
if (ereg('\.php$',$file) &&
if (substr($file, -4) == '.php' &&
is_readable(FOF_DIR . "/plugins/" . $file) &&
!$p->get('plugin_' . substr($file, 0, -4)))
{

View File

@ -146,7 +146,7 @@ if(isset($_POST['plugins']))
$plugins = array();
$dirlist = opendir(FOF_DIR . "/plugins");
while($file=readdir($dirlist))
if(ereg('\.php$',$file))
if(substr($file, -4) == '.php')
$plugins[] = substr($file, 0, -4);
closedir();

View File

@ -102,7 +102,7 @@ foreach($result as $item)
$item_link = htmlspecialchars($item['item_link']);
$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 = htmlspecialchars($item_guid);