Minor followup to r64197
[lhc/web/wiklou.git] / includes / LinksUpdate.php
index f566260..ef3374d 100644 (file)
@@ -198,6 +198,10 @@ class LinksUpdate {
 
                $cache = $this->mTitle->getBacklinkCache();
                $batches = $cache->partition( 'templatelinks', $wgUpdateRowsPerJob );
+               if ( !$batches ) {
+                       wfProfileOut( __METHOD__ );
+                       return;
+               }
                $jobs = array();
                foreach ( $batches as $batch ) {
                        list( $start, $end ) = $batch;
@@ -428,14 +432,6 @@ class LinksUpdate {
                foreach ( $diffs as $name => $sortkey ) {
                        $nt = Title::makeTitleSafe( NS_CATEGORY, $name );
                        $wgContLang->findVariantLink( $name, $nt, true );
-                       // for category redirection
-                       if ( $nt->isRedirect() ) {
-                               $at = new Article( $nt );
-                               $nt = $at->getRedirectTarget();
-                               // we only redirect a category to another category
-                               if ( $nt->getNamespace() == NS_CATEGORY )
-                                       $name = $nt->getText();
-                       }
                        $arr[] = array(
                                'cl_from'    => $this->mId,
                                'cl_to'      => $name,
@@ -677,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