Followup r78786: make back compat mode actually work by moving up $dbr assignment
authorRoan Kattouw <catrope@users.mediawiki.org>
Wed, 22 Dec 2010 18:08:52 +0000 (18:08 +0000)
committerRoan Kattouw <catrope@users.mediawiki.org>
Wed, 22 Dec 2010 18:08:52 +0000 (18:08 +0000)
includes/QueryPage.php

index eab73a4..cf3e0d0 100644 (file)
@@ -342,6 +342,7 @@ abstract class QueryPage extends SpecialPage {
         */
        function reallyDoQuery( $limit, $offset = false ) {
                $fname = get_class( $this ) . "::reallyDoQuery";
+               $dbr = wfGetDB( DB_SLAVE );
                $query = $this->getQueryInfo();
                $order = $this->getOrderFields();
                if ( $this->sortDescending() ) {
@@ -365,7 +366,6 @@ abstract class QueryPage extends SpecialPage {
                                $options['OFFSET'] = intval( $offset );
                        }
 
-                       $dbr = wfGetDB( DB_SLAVE );
                        $res = $dbr->select( $tables, $fields, $conds, $fname,
                                        $options, $join_conds
                        );