From: Tim Starling Date: Tue, 17 Feb 2009 02:48:40 +0000 (+0000) Subject: * Fix batching X-Git-Tag: 1.31.0-rc.0~42863 X-Git-Url: http://git.cyclocoop.org/%7B%24www_url%7Dadmin/compta/categories/modifier.php?a=commitdiff_plain;h=c49d1e8953c6f88cc3ca5bc981d998e4b69d68ac;p=lhc%2Fweb%2Fwiklou.git * Fix batching * Report when there is a directory where a file should be --- diff --git a/maintenance/checkImages.php b/maintenance/checkImages.php index 994cd5b9f2..378caa348b 100644 --- a/maintenance/checkImages.php +++ b/maintenance/checkImages.php @@ -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;