Created
October 26, 2011 17:50
-
-
Save leylaso/1317141 to your computer and use it in GitHub Desktop.
ereg to preg patch for Drupal 6.22 includes/files.inc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
From 45eaed831098fe253b0089517b3bdc8ac51f8d66 Mon Sep 17 00:00:00 2001 | |
From: Sofian Benaissa <[email protected]> | |
Date: Wed, 26 Oct 2011 13:48:54 -0400 | |
Subject: [PATCH] ereg to preg in file.inc | |
--- | |
includes/file.inc | 2 +- | |
1 files changed, 1 insertions(+), 1 deletions(-) | |
diff --git a/includes/file.inc b/includes/file.inc | |
index f9c38b2..ea631af 100644 | |
--- a/includes/file.inc | |
+++ b/includes/file.inc | |
@@ -959,7 +959,7 @@ function file_scan_directory($dir, $mask, $nomask = array('.', '..', 'CVS'), $ca | |
// Give priority to files in this folder by merging them in after any subdirectory files. | |
$files = array_merge(file_scan_directory("$dir/$file", $mask, $nomask, $callback, $recurse, $key, $min_depth, $depth + 1), $files); | |
} | |
- elseif ($depth >= $min_depth && ereg($mask, $file)) { | |
+ elseif ($depth >= $min_depth && preg_match("#$mask#", $file)) { | |
// Always use this match over anything already set in $files with the same $$key. | |
$filename = "$dir/$file"; | |
$basename = basename($file); | |
-- | |
1.7.1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment