Use ->parse() for messages on Special:ResetTokens
[lhc/web/wiklou.git] / includes / Pager.php
index 89930e2..3ada0e2 100644 (file)
@@ -150,7 +150,8 @@ abstract class IndexPager extends ContextSource implements Pager {
                }
 
                $this->mIsBackwards = ( $this->mRequest->getVal( 'dir' ) == 'prev' );
-               $this->mDb = wfGetDB( DB_SLAVE );
+               # Let the subclass set the DB here; otherwise use a slave DB for the current wiki
+               $this->mDb = $this->mDb ?: wfGetDB( DB_SLAVE );
 
                $index = $this->getIndexField(); // column to sort on
                $extraSort = $this->getExtraSortFields(); // extra columns to sort on for query planning