summaryrefslogtreecommitdiff
path: root/maintenance/cleanupTable.inc
diff options
context:
space:
mode:
authorPierre Schmitz <pierre@archlinux.de>2011-06-22 11:28:20 +0200
committerPierre Schmitz <pierre@archlinux.de>2011-06-22 11:28:20 +0200
commit9db190c7e736ec8d063187d4241b59feaf7dc2d1 (patch)
tree46d1a0dee7febef5c2d57a9f7b972be16a163b3d /maintenance/cleanupTable.inc
parent78677c7bbdcc9739f6c10c75935898a20e1acd9e (diff)
update to MediaWiki 1.17.0
Diffstat (limited to 'maintenance/cleanupTable.inc')
-rw-r--r--maintenance/cleanupTable.inc15
1 files changed, 8 insertions, 7 deletions
diff --git a/maintenance/cleanupTable.inc b/maintenance/cleanupTable.inc
index 3549a9a1..67a32510 100644
--- a/maintenance/cleanupTable.inc
+++ b/maintenance/cleanupTable.inc
@@ -17,10 +17,11 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
* http://www.gnu.org/copyleft/gpl.html
*
+ * @file
* @ingroup Maintenance
*/
-require_once( dirname(__FILE__) . '/Maintenance.php' );
+require_once( dirname( __FILE__ ) . '/Maintenance.php' );
class TableCleanup extends Maintenance {
protected $defaultParams = array(
@@ -44,7 +45,7 @@ class TableCleanup extends Maintenance {
global $wgUser;
$wgUser->setName( 'Conversion script' );
$this->dryrun = $this->hasOption( 'dry-run' );
- if( $this->dryrun ) {
+ if ( $this->dryrun ) {
$this->output( "Checking for bad titles...\n" );
} else {
$this->output( "Checking and fixing bad titles...\n" );
@@ -63,7 +64,7 @@ class TableCleanup extends Maintenance {
protected function progress( $updated ) {
$this->updated += $updated;
$this->processed++;
- if( $this->processed % $this->reportInterval != 0 ) {
+ if ( $this->processed % $this->reportInterval != 0 ) {
return;
}
$portion = $this->processed / $this->count;
@@ -74,7 +75,7 @@ class TableCleanup extends Maintenance {
$estimatedTotalTime = $delta / $portion;
$eta = $this->startTime + $estimatedTotalTime;
- $this->output(
+ $this->output(
sprintf( "%s %s: %6.2f%% done on %s; ETA %s [%d/%d] %.2f/sec <%.2f%% updated>\n",
wfWikiID(),
wfTimestamp( TS_DB, intval( $now ) ),
@@ -84,7 +85,7 @@ class TableCleanup extends Maintenance {
$this->processed,
$this->count,
$this->processed / $delta,
- $updateRate * 100.0
+ $updateRate * 100.0
)
);
flush();
@@ -94,9 +95,9 @@ class TableCleanup extends Maintenance {
$dbr = wfGetDB( DB_SLAVE );
if ( array_diff( array_keys( $params ),
- array( 'table', 'conds', 'index', 'callback' ) ) )
+ array( 'table', 'conds', 'index', 'callback' ) ) )
{
- throw new MWException( __METHOD__.': Missing parameter ' . implode( ', ', $params ) );
+ throw new MWException( __METHOD__ . ': Missing parameter ' . implode( ', ', $params ) );
}
$table = $params['table'];