From 839f3ffd651465380923a5110dc834c23fd9c27f Mon Sep 17 00:00:00 2001 From: Brion Vibber Date: Fri, 11 Jan 2008 04:41:11 +0000 Subject: [PATCH] Tweak for r29561: don't grab a database object until we need it --- includes/Title.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/includes/Title.php b/includes/Title.php index 2976078e34..e0d55143e1 100644 --- a/includes/Title.php +++ b/includes/Title.php @@ -1256,13 +1256,12 @@ class Title { * protection, or false if there's none. */ public function getTitleProtection() { - $dbr = wfGetDB( DB_SLAVE ); - // Can't protect pages in special namespaces if ( $this->getNamespace() < NS_MAIN ) { return false; } + $dbr = wfGetDB( DB_SLAVE ); $res = $dbr->select( 'protected_titles', '*', array ('pt_namespace' => $this->getNamespace(), 'pt_title' => $this->getDBKey()) ); -- 2.20.1