From 4906d5091161bd6041958d1f6ad36517b632030e Mon Sep 17 00:00:00 2001 From: Sam Reed Date: Wed, 12 Jan 2011 02:16:56 +0000 Subject: [PATCH] Follwup r75575, honour table prefixes. Bad Roan ;) --- maintenance/cleanupRemovedModules.php | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/maintenance/cleanupRemovedModules.php b/maintenance/cleanupRemovedModules.php index f89acb2eb7..a4261f9348 100644 --- a/maintenance/cleanupRemovedModules.php +++ b/maintenance/cleanupRemovedModules.php @@ -44,10 +44,11 @@ class CleanupRemovedModules extends Maintenance { $this->output( "Cleaning up module_deps table...\n" ); $i = 1; + $modDeps = $dbw->tableName( 'module_deps' ); do { // $dbw->delete() doesn't support LIMIT :( $where = $moduleList ? "md_module NOT IN ($moduleList)" : '1=1'; - $dbw->query( "DELETE FROM module_deps WHERE $where LIMIT $limit", __METHOD__ ); + $dbw->query( "DELETE FROM $modDeps WHERE $where LIMIT $limit", __METHOD__ ); $numRows = $dbw->affectedRows(); $this->output( "Batch $i: $numRows rows\n" ); $i++; @@ -57,9 +58,11 @@ class CleanupRemovedModules extends Maintenance { $this->output( "Cleaning up msg_resource table...\n" ); $i = 1; + + $mrRes = $dbw->tableName( 'mr_resource' ); do { $where = $moduleList ? "mr_resource NOT IN ($moduleList)" : '1=1'; - $dbw->query( "DELETE FROM msg_resource WHERE $where LIMIT $limit", __METHOD__ ); + $dbw->query( "DELETE FROM $mrRes WHERE $where LIMIT $limit", __METHOD__ ); $numRows = $dbw->affectedRows(); $this->output( "Batch $i: $numRows rows\n" ); $i++; @@ -69,9 +72,10 @@ class CleanupRemovedModules extends Maintenance { $this->output( "Cleaning up msg_resource_links table...\n" ); $i = 1; + $msgRes = $dbw->tableName( 'mr_resource_links' ); do { $where = $moduleList ? "mrl_resource NOT IN ($moduleList)" : '1=1'; - $dbw->query( "DELETE FROM msg_resource_links WHERE $where LIMIT $limit", __METHOD__ ); + $dbw->query( "DELETE FROM $msgRes WHERE $where LIMIT $limit", __METHOD__ ); $numRows = $dbw->affectedRows(); $this->output( "Batch $i: $numRows rows\n" ); $i++; -- 2.20.1