bug #2022182 [import, export] Import/Export fails because of Mac files

This commit is contained in:
Marc Delisle
2008-07-23 16:55:33 +00:00
parent aa199885cf
commit 37b3fbb8e3
2 changed files with 6 additions and 1 deletions

View File

@@ -92,6 +92,7 @@ danbarry
- bug #2018595 [import] Potential data loss on import resubmit
- patch #2020630 [export] Safari and timedate, thanks to Sebastian Mendel,
Isaac Bennetch and Jürgen Wind
- bug #2022182 [import, export] Import/Export fails because of Mac files
2.11.7.1 (2008-07-15)
- bug [security] XSRF/CSRF by manipulating the db,

View File

@@ -27,7 +27,11 @@ function PMA_getPlugins($plugins_dir, $plugin_param)
if ($handle = @opendir($plugins_dir)) {
$is_first = 0;
while ($file = @readdir($handle)) {
if (is_file($plugins_dir . $file) && eregi('\.php$', $file)) {
// In some situations, Mac OS creates a new file for each file
// (for example ._csv.php) so the following regexp
// matches a file which does not start with a dot but ends
// with ".php"
if (is_file($plugins_dir . $file) && preg_match('@^[^\.](.)*\.php$@i', $file)) {
include $plugins_dir . $file;
}
}