]> scripts.mit.edu Git - autoinstallsdev/mediawiki.git/blobdiff - maintenance/checkImages.php
MediaWiki 1.15.0
[autoinstallsdev/mediawiki.git] / maintenance / checkImages.php
index 994cd5b9f23163d2bfc1780c1bccea48ef1d6333..378caa348b6ea4d839e4f0aa1347ce883959e6f6 100644 (file)
@@ -11,7 +11,8 @@ $numImages = 0;
 $numGood = 0;
 
 do {
-       $res = $dbr->select( 'image', '*', array( 'img_name > ' . $dbr->addQuotes( $start ) ) );
+       $res = $dbr->select( 'image', '*', array( 'img_name > ' . $dbr->addQuotes( $start ) ), 
+               'checkImages.php', array( 'LIMIT' => $batchSize ) );
        foreach ( $res as $row ) {
                $numImages++;
                $start = $row->img_name;
@@ -27,6 +28,11 @@ do {
                        continue;
                }
 
+               if ( $stat['mode'] & 040000 ) {
+                       echo "{$row->img_name}: is a directory\n";
+                       continue;
+               }
+
                if ( $stat['size'] == 0 && $row->img_size != 0 ) {
                        echo "{$row->img_name}: truncated, was {$row->img_size}\n";
                        continue;