r56218 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r56217‎ | r56218 | r56219 >
Date:00:05, 12 September 2009
Author:brion
Status:ok
Tags:
Comment:
cleanup r56216 deleteSelfExternals a little - fix short PHP tag, use escaping for good measure (though in most cases we'll be clean)
Modified paths:
  • /trunk/phase3/maintenance/deleteSelfExternals.php (modified) (history)

Diff [purge]

Index: trunk/phase3/maintenance/deleteSelfExternals.php
@@ -1,4 +1,4 @@
2 -<?
 2+<?php
33
44 require_once("commandLine.inc");
55
@@ -7,10 +7,9 @@
88 while (1) {
99 wfWaitForSlaves( 2 );
1010 $db->commit();
11 - $q="DELETE /* deleteSelfExternals */ FROM externallinks WHERE el_to LIKE '$wgServer/%' LIMIT 1000\n";
 11+ $encServer = $db->escapeLike( $wgServer );
 12+ $q="DELETE /* deleteSelfExternals */ FROM externallinks WHERE el_to LIKE '$encServer/%' LIMIT 1000\n";
1213 print "Deleting a batch\n";
1314 $db->query($q);
1415 if (!$db->affectedRows()) exit(0);
1516 }
16 -
17 -?>

Follow-up revisions

RevisionCommit summaryAuthorDate
r56374Merge post-branch trunk updates replacing old live hacks:...brion17:25, 15 September 2009

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r56216Merge deleteSelfExternals.php handy pruning script from wmf-deployment r53856brion00:02, 12 September 2009

Status & tagging log