X-Git-Url: https://git.cyclocoop.org/%242?a=blobdiff_plain;f=maintenance%2FimportTextFiles.php;h=5531ffc3afb0e124e843110c0d8ea2177979e578;hb=1b8eac21abd41d0d9ddae8a4358e2aa933b0d959;hp=88ee9d7ecdda9a416544a6b0b017a9bfb822b3f3;hpb=d5ff621d43b195c41c141288fb8d2b05793b55f4;p=lhc%2Fweb%2Fwiklou.git diff --git a/maintenance/importTextFiles.php b/maintenance/importTextFiles.php index 88ee9d7ecd..5531ffc3af 100644 --- a/maintenance/importTextFiles.php +++ b/maintenance/importTextFiles.php @@ -63,7 +63,16 @@ class ImportTextFiles extends Maintenance { if ( file_exists( $arg ) ) { $files[$arg] = file_get_contents( $arg ); } else { - $this->error( "Fatal error: The file '$arg' does not exist!", 1 ); + // use glob to support the Windows shell, which doesn't automatically + // expand wildcards + $found = false; + foreach ( glob( $arg ) as $filename ) { + $found = true; + $files[$filename] = file_get_contents( $filename ); + } + if ( !$found ) { + $this->error( "Fatal error: The file '$arg' does not exist!", 1 ); + } } };