r80075 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r80074‎ | r80075 | r80076 >
Date:02:16, 12 January 2011
Author:reedy
Status:ok
Tags:
Comment:
Follwup r75575, honour table prefixes. Bad Roan ;)
Modified paths:
  • /trunk/phase3/maintenance/cleanupRemovedModules.php (modified) (history)

Diff [purge]

Index: trunk/phase3/maintenance/cleanupRemovedModules.php
@@ -44,10 +44,11 @@
4545
4646 $this->output( "Cleaning up module_deps table...\n" );
4747 $i = 1;
 48+ $modDeps = $dbw->tableName( 'module_deps' );
4849 do {
4950 // $dbw->delete() doesn't support LIMIT :(
5051 $where = $moduleList ? "md_module NOT IN ($moduleList)" : '1=1';
51 - $dbw->query( "DELETE FROM module_deps WHERE $where LIMIT $limit", __METHOD__ );
 52+ $dbw->query( "DELETE FROM $modDeps WHERE $where LIMIT $limit", __METHOD__ );
5253 $numRows = $dbw->affectedRows();
5354 $this->output( "Batch $i: $numRows rows\n" );
5455 $i++;
@@ -57,9 +58,11 @@
5859
5960 $this->output( "Cleaning up msg_resource table...\n" );
6061 $i = 1;
 62+
 63+ $mrRes = $dbw->tableName( 'mr_resource' );
6164 do {
6265 $where = $moduleList ? "mr_resource NOT IN ($moduleList)" : '1=1';
63 - $dbw->query( "DELETE FROM msg_resource WHERE $where LIMIT $limit", __METHOD__ );
 66+ $dbw->query( "DELETE FROM $mrRes WHERE $where LIMIT $limit", __METHOD__ );
6467 $numRows = $dbw->affectedRows();
6568 $this->output( "Batch $i: $numRows rows\n" );
6669 $i++;
@@ -69,9 +72,10 @@
7073
7174 $this->output( "Cleaning up msg_resource_links table...\n" );
7275 $i = 1;
 76+ $msgRes = $dbw->tableName( 'mr_resource_links' );
7377 do {
7478 $where = $moduleList ? "mrl_resource NOT IN ($moduleList)" : '1=1';
75 - $dbw->query( "DELETE FROM msg_resource_links WHERE $where LIMIT $limit", __METHOD__ );
 79+ $dbw->query( "DELETE FROM $msgRes WHERE $where LIMIT $limit", __METHOD__ );
7680 $numRows = $dbw->affectedRows();
7781 $this->output( "Batch $i: $numRows rows\n" );
7882 $i++;

Follow-up revisions

RevisionCommit summaryAuthorDate
r80076Fix typo from r80075...reedy02:19, 12 January 2011
r80077Fix another typo in r80075reedy02:20, 12 January 2011
r801751.17: MFT r79960, r80034, r80036, r80043, r80044, r80050, r80053, r80074, r80...catrope17:13, 13 January 2011

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r75575Re-add maintenance script from r75555, not totally broken this timecatrope20:08, 27 October 2010

Status & tagging log