Don't query unneeded rows on watchlist
authorAryeh Gregor <simetrical@users.mediawiki.org>
Wed, 28 Jan 2009 16:46:26 +0000 (16:46 +0000)
committerAryeh Gregor <simetrical@users.mediawiki.org>
Wed, 28 Jan 2009 16:46:26 +0000 (16:46 +0000)
This probably doesn't need to use a LinkBatch at all -- it could just
retrieve some extra info in the watchlist query.  But we need a
LinkBatch anyway for the user pages, so why not.

By request of Domas.

includes/specials/SpecialWatchlist.php

index 6075dd1..0283cf0 100644 (file)
@@ -323,6 +323,8 @@ function wfSpecialWatchlist( $par ) {
                        $linkBatch->add( NS_USER, $userNameUnderscored );
                }
                $linkBatch->add( NS_USER_TALK, $userNameUnderscored );
+
+               $linkBatch->add( $row->rc_namespace, $row->rc_title );
        }
        $linkBatch->execute();
        $dbr->dataSeek( $res, 0 );