Index: trunk/phase3/maintenance/cleanupRemovedModules.php |
— | — | @@ -44,10 +44,11 @@ |
45 | 45 | |
46 | 46 | $this->output( "Cleaning up module_deps table...\n" ); |
47 | 47 | $i = 1; |
| 48 | + $modDeps = $dbw->tableName( 'module_deps' ); |
48 | 49 | do { |
49 | 50 | // $dbw->delete() doesn't support LIMIT :( |
50 | 51 | $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__ ); |
52 | 53 | $numRows = $dbw->affectedRows(); |
53 | 54 | $this->output( "Batch $i: $numRows rows\n" ); |
54 | 55 | $i++; |
— | — | @@ -57,9 +58,11 @@ |
58 | 59 | |
59 | 60 | $this->output( "Cleaning up msg_resource table...\n" ); |
60 | 61 | $i = 1; |
| 62 | + |
| 63 | + $mrRes = $dbw->tableName( 'mr_resource' ); |
61 | 64 | do { |
62 | 65 | $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__ ); |
64 | 67 | $numRows = $dbw->affectedRows(); |
65 | 68 | $this->output( "Batch $i: $numRows rows\n" ); |
66 | 69 | $i++; |
— | — | @@ -69,9 +72,10 @@ |
70 | 73 | |
71 | 74 | $this->output( "Cleaning up msg_resource_links table...\n" ); |
72 | 75 | $i = 1; |
| 76 | + $msgRes = $dbw->tableName( 'mr_resource_links' ); |
73 | 77 | do { |
74 | 78 | $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__ ); |
76 | 80 | $numRows = $dbw->affectedRows(); |
77 | 81 | $this->output( "Batch $i: $numRows rows\n" ); |
78 | 82 | $i++; |