From dd082a7ff41d3bc57291c067e69fe4d904ddf960 Mon Sep 17 00:00:00 2001 From: Roan Kattouw Date: Wed, 22 Dec 2010 18:08:52 +0000 Subject: [PATCH] Followup r78786: make back compat mode actually work by moving up $dbr assignment --- includes/QueryPage.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/includes/QueryPage.php b/includes/QueryPage.php index eab73a4880..cf3e0d03a0 100644 --- a/includes/QueryPage.php +++ b/includes/QueryPage.php @@ -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 ); -- 2.20.1