dépôts
/
lhc
/
web
/
wiklou.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge "Move up devunt's name to Developers"
[lhc/web/wiklou.git]
/
maintenance
/
importImages.php
diff --git
a/maintenance/importImages.php
b/maintenance/importImages.php
index
512c38c
..
5a4ab39
100644
(file)
--- 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 {
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'] );
$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 = $image->publish( $file, $flags, $publishOptions );
if ( !$archive->isGood() ) {
echo "failed. (" .
- $archive->getWikiText() .
+ $archive->getWikiText(
false, false, 'en'
) .
")\n";
$failed++;
continue;
")\n";
$failed++;
continue;
@@
-297,8
+298,8
@@
if ( $count > 0 ) {
if ( $doProtect ) {
# Protect the file
if ( $doProtect ) {
# Protect the file
- echo "\nWaiting for
slave
s...\n";
- // Wait for
slave
s.
+ echo "\nWaiting for
replica DB
s...\n";
+ // Wait for
replica DB
s.
sleep( 2.0 ); # Why this sleep?
wfWaitForSlaves();
sleep( 2.0 ); # Why this sleep?
wfWaitForSlaves();