https://www.mediawiki.org/wiki/Special:Code/MediaWiki/113929

Revision: 113929
Author:   reedy
Date:     2012-03-15 16:12:09 +0000 (Thu, 15 Mar 2012)
Log Message:
-----------
MFT r113928

Modified Paths:
--------------
    branches/wmf/1.19wmf1/extensions/WikimediaMaintenance/cleanupBug31576.php

Property Changed:
----------------
    branches/wmf/1.19wmf1/extensions/WikimediaMaintenance/


Property changes on: branches/wmf/1.19wmf1/extensions/WikimediaMaintenance
___________________________________________________________________
Modified: svn:mergeinfo
   - /branches/wmf/1.18wmf1/maintenance:106284,109759
   + /branches/wmf/1.18wmf1/maintenance:106284,109759
/trunk/extensions/WikimediaMaintenance:113928

Modified: 
branches/wmf/1.19wmf1/extensions/WikimediaMaintenance/cleanupBug31576.php
===================================================================
--- branches/wmf/1.19wmf1/extensions/WikimediaMaintenance/cleanupBug31576.php   
2012-03-15 16:09:39 UTC (rev 113928)
+++ branches/wmf/1.19wmf1/extensions/WikimediaMaintenance/cleanupBug31576.php   
2012-03-15 16:12:09 UTC (rev 113929)
@@ -2,6 +2,11 @@
 require_once( dirname( __FILE__ ) . '/WikimediaMaintenance.php' );
 
 class CleanupBug31576 extends WikimediaMaintenance {
+
+       protected $batchsize;
+
+       protected $processed = array();
+
        public function __construct() {
                parent::__construct();
                $this->mDescription = "Cleans up templatelinks corruption 
caused by https://bugzilla.wikimedia.org/show_bug.cgi?id=31576";;
@@ -38,15 +43,14 @@
                                break;
                        }
 
-                       $processed = array();
                        foreach ( $res as $row ) {
                                $vCount++;
-                               if ( isset( $processed[$row->tl_from] ) ) {
+                               if ( isset( $this->processed[$row->tl_from] ) ) 
{
                                        // We've already processed this page, 
skip it
                                        continue;
                                }
                                RefreshLinks::fixLinksFromArticle( 
$row->tl_from );
-                               $processed[$row->tl_from] = true;
+                               $this->processed[$row->tl_from] = true;
                                $pCount++;
                        }
                        $this->output( "{$pCount}/{$vCount} pages processed\n" 
);


_______________________________________________
MediaWiki-CVS mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs

Reply via email to