Index: trunk/extensions/WikimediaMaintenance/cleanupBug31576.php |
— | — | @@ -2,6 +2,11 @@ |
3 | 3 | require_once( dirname( __FILE__ ) . '/WikimediaMaintenance.php' ); |
4 | 4 | |
5 | 5 | class CleanupBug31576 extends WikimediaMaintenance { |
| 6 | + |
| 7 | + protected $batchsize; |
| 8 | + |
| 9 | + protected $processed = array(); |
| 10 | + |
6 | 11 | public function __construct() { |
7 | 12 | parent::__construct(); |
8 | 13 | $this->mDescription = "Cleans up templatelinks corruption caused by https://bugzilla.wikimedia.org/show_bug.cgi?id=31576"; |
— | — | @@ -38,15 +43,14 @@ |
39 | 44 | break; |
40 | 45 | } |
41 | 46 | |
42 | | - $processed = array(); |
43 | 47 | foreach ( $res as $row ) { |
44 | 48 | $vCount++; |
45 | | - if ( isset( $processed[$row->tl_from] ) ) { |
| 49 | + if ( isset( $this->processed[$row->tl_from] ) ) { |
46 | 50 | // We've already processed this page, skip it |
47 | 51 | continue; |
48 | 52 | } |
49 | 53 | RefreshLinks::fixLinksFromArticle( $row->tl_from ); |
50 | | - $processed[$row->tl_from] = true; |
| 54 | + $this->processed[$row->tl_from] = true; |
51 | 55 | $pCount++; |
52 | 56 | } |
53 | 57 | $this->output( "{$pCount}/{$vCount} pages processed\n" ); |