X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=maintenance%2FimportImages.php;h=5a4ab394032d0aa00c36f63a91c6c1c483dfa42f;hb=f43fa6f4f0e2cb60b8543daad661b48a3e0653a9;hp=512c38cb32ac780cb531240d98a71229fc56dc15;hpb=1024249502ed39f5a5d1871b3112de71186e4432;p=lhc%2Fweb%2Fwiklou.git diff --git a/maintenance/importImages.php b/maintenance/importImages.php index 512c38cb32..5a4ab39403 100644 --- a/maintenance/importImages.php +++ b/maintenance/importImages.php @@ -245,7 +245,8 @@ if ( $count > 0 ) { if ( isset( $options['dry'] ) ) { echo " publishing {$file} by '" . $wgUser->getName() . "', comment '$commentText'... "; } else { - $props = FSFile::getPropsFromPath( $file ); + $mwProps = new MWFileProps( MimeMagic::singleton() ); + $props = $mwProps->getPropsFromPath( $file, true ); $flags = 0; $publishOptions = []; $handler = MediaHandler::getHandler( $props['mime'] ); @@ -257,7 +258,7 @@ if ( $count > 0 ) { $archive = $image->publish( $file, $flags, $publishOptions ); if ( !$archive->isGood() ) { echo "failed. (" . - $archive->getWikiText() . + $archive->getWikiText( false, false, 'en' ) . ")\n"; $failed++; continue; @@ -297,8 +298,8 @@ if ( $count > 0 ) { if ( $doProtect ) { # Protect the file - echo "\nWaiting for slaves...\n"; - // Wait for slaves. + echo "\nWaiting for replica DBs...\n"; + // Wait for replica DBs. sleep( 2.0 ); # Why this sleep? wfWaitForSlaves();