Some HipHop fixes:
[lhc/web/wiklou.git] / maintenance / importImages.php
index ff1e3e5..47dc3cc 100644 (file)
@@ -212,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;
                                }
@@ -247,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 ) )
@@ -258,7 +260,7 @@ if ( count( $args ) > 0 ) {
                                }
 
                        } else {
-                               echo( "failed.\n" );
+                               echo( "failed. (at recordUpload stage)\n" );
                                $svar = 'failed';
                        }