Use correct fields for LinkBatch on Special:NewPages
authorumherirrender <umherirrender_de.wp@web.de>
Fri, 19 Jun 2015 16:04:56 +0000 (18:04 +0200)
committerumherirrender <umherirrender_de.wp@web.de>
Fri, 19 Jun 2015 16:04:56 +0000 (18:04 +0200)
The special pages is using page_namespace/page_title for the display
title, not rc_namespace/rc_title. Changing this avoids a extra query for
the title when a page was moved and is listed on the special page with
the hint 'rc-old-title'

Change-Id: Ie1e4c9b93c00534543cf75bc3ea2c7e5f8d17460

includes/specials/SpecialNewpages.php

index 899c736..02e3325 100644 (file)
@@ -594,7 +594,7 @@ class NewPagesPager extends ReverseChronologicalPager {
                foreach ( $this->mResult as $row ) {
                        $linkBatch->add( NS_USER, $row->rc_user_text );
                        $linkBatch->add( NS_USER_TALK, $row->rc_user_text );
-                       $linkBatch->add( $row->rc_namespace, $row->rc_title );
+                       $linkBatch->add( $row->page_namespace, $row->page_title );
                }
                $linkBatch->execute();