Minor followup to r64197
[lhc/web/wiklou.git] / includes / LinksUpdate.php
index 0312250..ef3374d 100644 (file)
@@ -199,6 +199,7 @@ class LinksUpdate {
                $cache = $this->mTitle->getBacklinkCache();
                $batches = $cache->partition( 'templatelinks', $wgUpdateRowsPerJob );
                if ( !$batches ) {
+                       wfProfileOut( __METHOD__ );
                        return;
                }
                $jobs = array();
@@ -427,21 +428,6 @@ class LinksUpdate {
        function getCategoryInsertions( $existing = array() ) {
                global $wgContLang;
                $diffs = array_diff_assoc( $this->mCategories, $existing );
-               foreach ( $this->mCategories as $name => $sortkey ) {
-                       $newname = $name;
-                       $nt = Title::makeTitleSafe( NS_CATEGORY, $newname );
-                       $wgContLang->findVariantLink( $newname, $nt, true );
-                       // for category redirection
-                       if ( $nt->isRedirect() ) {
-                               $at = new Article( $nt );
-                               $nt = $at->getRedirectTarget();
-                               $newname = $nt->getText();
-                               // we only redirect a category to another category
-                               if ( ! array_key_exists( $newname, $existing )
-                                        and $nt->getNamespace() == NS_CATEGORY )
-                                       $diffs[$newname] = $sortkey;
-                       }
-               }
                $arr = array();
                foreach ( $diffs as $name => $sortkey ) {
                        $nt = Title::makeTitleSafe( NS_CATEGORY, $name );
@@ -687,6 +673,13 @@ class LinksUpdate {
        function getTitle() {
                return $this->mTitle;
        }
+       
+       /**
+        * Return the list of images used as generated by the parser
+        */
+       public function getImages() {
+               return $this->mImages;
+       }
 
        /**
         * Invalidate any necessary link lists related to page property changes