all MDL-20821 Removed ereg related deprecated functions

This commit is contained in:
Andrew Davis
2009-11-18 07:36:20 +00:00
parent 4dadad0869
commit 76561f1e4e
70 changed files with 1393 additions and 310 deletions
+2 -2
View File
@@ -173,8 +173,8 @@ function blocks_name_allowed_in_format($name, $pageformat) {
$depth = -1;
if ($formats = block_method_result($name, 'applicable_formats')) {
foreach($formats as $format => $allowed) {
$thisformat = '^'.str_replace('*', '[^-]*', $format).'.*$';
if(ereg($thisformat, $pageformat)) {
$thisformat = '/^'.str_replace('*', '[^-]*', $format).'.*$/';
if(preg_match($thisformat, $pageformat)) {
if(($scount = substr_count($format, '-')) > $depth) {
$depth = $scount;
$accept = $allowed;