diff --git a/fof-main.php b/fof-main.php index 805710f..91cf899 100644 --- a/fof-main.php +++ b/fof-main.php @@ -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))) { diff --git a/prefs.php b/prefs.php index b8c84d3..f790194 100644 --- a/prefs.php +++ b/prefs.php @@ -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(); diff --git a/shared.php b/shared.php index 3b820bd..203436b 100644 --- a/shared.php +++ b/shared.php @@ -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);