Index: trunk/phase3/maintenance/deleteSelfExternals.php |
— | — | @@ -1,4 +1,4 @@ |
2 | | -<? |
| 2 | +<?php |
3 | 3 | |
4 | 4 | require_once("commandLine.inc"); |
5 | 5 | |
— | — | @@ -7,10 +7,9 @@ |
8 | 8 | while (1) { |
9 | 9 | wfWaitForSlaves( 2 ); |
10 | 10 | $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"; |
12 | 13 | print "Deleting a batch\n"; |
13 | 14 | $db->query($q); |
14 | 15 | if (!$db->affectedRows()) exit(0); |
15 | 16 | } |
16 | | - |
17 | | -?> |