r56216 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r56215‎ | r56216 | r56217 >
Date:00:02, 12 September 2009
Author:brion
Status:resolved
Tags:
Comment:
Merge deleteSelfExternals.php handy pruning script from wmf-deployment r53856
Modified paths:
  • /trunk/phase3/maintenance/deleteSelfExternals.php (added) (history)

Diff [purge]

Index: trunk/phase3/maintenance/deleteSelfExternals.php
@@ -0,0 +1,16 @@
 2+<?
 3+
 4+require_once("commandLine.inc");
 5+
 6+print "Deleting self externals from $wgServer\n";
 7+$db = wfGetDB(DB_MASTER);
 8+while (1) {
 9+ wfWaitForSlaves( 2 );
 10+ $db->commit();
 11+ $q="DELETE /* deleteSelfExternals */ FROM externallinks WHERE el_to LIKE '$wgServer/%' LIMIT 1000\n";
 12+ print "Deleting a batch\n";
 13+ $db->query($q);
 14+ if (!$db->affectedRows()) exit(0);
 15+}
 16+
 17+?>
Property changes on: trunk/phase3/maintenance/deleteSelfExternals.php
___________________________________________________________________
Added: svn:mergeinfo
118 Merged /trunk/phase3/maintenance/deleteSelfExternals.php:r52290,52402,52404,52718,52737,52759,52776,52791,52800,52808,52812-52813,52815-52819,52822,52846,52850,52852-52853,52855-52857,52859,52924,52986,53128-53129,53190,53197,53199,53203-53204,53210-53211,53247,53249,53252,53267,53270,53293,53305,53344,53369,53427,53502-53504,53506,53777,54384,54494,54592,54599-54602,54604,54613,54764,54793,54806,55178,55626
219 Merged /branches/REL1_15/phase3/maintenance/deleteSelfExternals.php:r51646
Added: svn:eol-style
320 + native

Follow-up revisions

RevisionCommit summaryAuthorDate
r56218cleanup r56216 deleteSelfExternals a little - fix short PHP tag, use escaping...brion00:05, 12 September 2009
r56374Merge post-branch trunk updates replacing old live hacks:...brion17:25, 15 September 2009

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r53856commit live hack from Domasbrion03:42, 28 July 2009

Status & tagging log