diff options
author | Pierre Schmitz <pierre@archlinux.de> | 2011-12-03 13:29:22 +0100 |
---|---|---|
committer | Pierre Schmitz <pierre@archlinux.de> | 2011-12-03 13:29:22 +0100 |
commit | ca32f08966f1b51fcb19460f0996bb0c4048e6fe (patch) | |
tree | ec04cc15b867bc21eedca904cea9af0254531a11 /maintenance/importImages.php | |
parent | a22fbfc60f36f5f7ee10d5ae6fe347340c2ee67c (diff) |
Update to MediaWiki 1.18.0
* also update ArchLinux skin to chagnes in MonoBook
* Use only css to hide our menu bar when printing
Diffstat (limited to 'maintenance/importImages.php')
-rw-r--r-- | maintenance/importImages.php | 29 |
1 files changed, 23 insertions, 6 deletions
diff --git a/maintenance/importImages.php b/maintenance/importImages.php index befbe64d..f3b10ea9 100644 --- a/maintenance/importImages.php +++ b/maintenance/importImages.php @@ -11,6 +11,21 @@ * - fetch metadata from source wiki for each file to import. * - commit the fetched metadata to the destination wiki while submitting. * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along + * with this program; if not, write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * http://www.gnu.org/copyleft/gpl.html + * * @file * @ingroup Maintenance * @author Rob Church <robchur@gmail.com> @@ -81,7 +96,7 @@ if ( count( $args ) > 0 ) { die( "failed to read comment file: {$options['comment-file']}\n" ); } } - else if ( isset( $options['comment'] ) ) { + elseif ( isset( $options['comment'] ) ) { $comment = $options['comment']; } @@ -197,7 +212,9 @@ if ( count( $args ) > 0 ) { } else { $archive = $image->publish( $file ); if ( !$archive->isGood() ) { - echo( "failed.\n" ); + echo( "failed. (" . + $archive->getWikiText() . + ")\n" ); $failed++; continue; } @@ -224,7 +241,7 @@ if ( count( $args ) > 0 ) { if ( isset( $options['dry'] ) ) { echo( "done.\n" ); - } else if ( $image->recordUpload( $archive->value, $commentText, $license ) ) { + } elseif ( $image->recordUpload( $archive->value, $commentText, $license ) ) { # We're done! echo( "done.\n" ); if ( $doProtect ) { @@ -232,8 +249,8 @@ if ( count( $args ) > 0 ) { $article = new Article( $title ); echo "\nWaiting for slaves...\n"; // Wait for slaves. - sleep( 2.0 ); - wfWaitForSlaves( 1.0 ); + sleep( 2.0 ); # Why this sleep? + wfWaitForSlaves(); echo( "\nSetting image restrictions ... " ); if ( $article->updateRestrictions( $restrictions ) ) @@ -243,7 +260,7 @@ if ( count( $args ) > 0 ) { } } else { - echo( "failed.\n" ); + echo( "failed. (at recordUpload stage)\n" ); $svar = 'failed'; } |