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
Remove begin/commit transaction calls in refreshLinks.php
[lhc/web/wiklou.git]
/
maintenance
/
cleanupTable.inc
diff --git
a/maintenance/cleanupTable.inc
b/maintenance/cleanupTable.inc
index
48bb53e
..
84e3aee
100644
(file)
--- a/
maintenance/cleanupTable.inc
+++ b/
maintenance/cleanupTable.inc
@@
-37,7
+37,6
@@
class TableCleanup extends Maintenance {
);
protected $dryrun = false;
);
protected $dryrun = false;
- protected $maxLag = 10; # if slaves are lagged more than 10 secs, wait
public $batchSize = 100;
public $reportInterval = 100;
public $batchSize = 100;
public $reportInterval = 100;
@@
-50,11
+49,12
@@
class TableCleanup extends Maintenance {
public function execute() {
global $wgUser;
public function execute() {
global $wgUser;
- $wgUser = User::newFromName( 'Conversion script' );
$this->dryrun = $this->hasOption( 'dry-run' );
if ( $this->dryrun ) {
$this->dryrun = $this->hasOption( 'dry-run' );
if ( $this->dryrun ) {
+ $wgUser = User::newFromName( 'Conversion script' );
$this->output( "Checking for bad titles...\n" );
} else {
$this->output( "Checking for bad titles...\n" );
} else {
+ $wgUser = User::newSystemUser( 'Conversion script', array( 'steal' => true ) );
$this->output( "Checking and fixing bad titles...\n" );
}
$this->runTable( $this->defaultParams );
$this->output( "Checking and fixing bad titles...\n" );
}
$this->runTable( $this->defaultParams );
@@
-109,8
+109,8
@@
class TableCleanup extends Maintenance {
$dbr = wfGetDB( DB_SLAVE );
if ( array_diff( array_keys( $params ),
$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 ) );
}
@@
-120,7
+120,6
@@
class TableCleanup extends Maintenance {
$this->init( $count, $table );
$this->output( "Processing $table...\n" );
$this->init( $count, $table );
$this->output( "Processing $table...\n" );
-
$index = (array)$params['index'];
$indexConds = array();
$options = array(
$index = (array)$params['index'];
$indexConds = array();
$options = array(