dépôts
/
lhc
/
web
/
wiklou.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge "Add function OutputPage::getHeadLinksArray()"
[lhc/web/wiklou.git]
/
maintenance
/
cleanupTable.inc
diff --git
a/maintenance/cleanupTable.inc
b/maintenance/cleanupTable.inc
index
67a3251
..
1c27976
100644
(file)
--- a/
maintenance/cleanupTable.inc
+++ b/
maintenance/cleanupTable.inc
@@
-43,7
+43,7
@@
class TableCleanup extends Maintenance {
public function execute() {
global $wgUser;
public function execute() {
global $wgUser;
- $wgUser
->set
Name( 'Conversion script' );
+ $wgUser
= User::newFrom
Name( 'Conversion script' );
$this->dryrun = $this->hasOption( 'dry-run' );
if ( $this->dryrun ) {
$this->output( "Checking for bad titles...\n" );
$this->dryrun = $this->hasOption( 'dry-run' );
if ( $this->dryrun ) {
$this->output( "Checking for bad titles...\n" );
@@
-101,7
+101,8
@@
class TableCleanup extends Maintenance {
}
$table = $params['table'];
}
$table = $params['table'];
- $count = $dbr->selectField( $table, 'count(*)', $params['conds'], __METHOD__ );
+ // count(*) would melt the DB for huge tables, we can estimate here
+ $count = $dbr->estimateRowCount( $table, '*', '', __METHOD__ );
$this->init( $count, $table );
$this->output( "Processing $table...\n" );
$this->init( $count, $table );
$this->output( "Processing $table...\n" );