X-Git-Url: https://scripts.mit.edu/gitweb/autoinstalls/wordpress.git/blobdiff_plain/cc7b1505cd9fafd87c3672f669e13e98b0c544f7..312084b5d95c21feb519ff03decf948420e1f6fa:/wp-admin/import.php?ds=sidebyside diff --git a/wp-admin/import.php b/wp-admin/import.php index 4e05527d..86dcb147 100644 --- a/wp-admin/import.php +++ b/wp-admin/import.php @@ -1,28 +1,43 @@
-

-

+ +

+

read()) !== false) { - if (preg_match('|^\.+$|', $file)) + while (($file = readdir($imports_dir)) !== false) { + if ($file{0} == '.') { continue; - if (preg_match('|\.php$|', $file)) - require_once("$import_root/$file"); + } elseif (substr($file, -4) == '.php') { + require_once($import_root . '/' . $file); + } } } +@closedir($imports_dir); $importers = get_importers(); @@ -30,7 +45,7 @@ if (empty ($importers)) { echo '

'.__('No importers are available.').'

'; // TODO: make more helpful } else { ?> - +
- - + + "; } ?>
$action{$data[1]}$action{$data[1]}