From 9b748e7588ef0072b92a7719a4b459d49c3a3367 Mon Sep 17 00:00:00 2001 From: Alexandre Emsenhuber Date: Tue, 29 Apr 2008 19:18:58 +0000 Subject: [PATCH] Only load old page_restrictions field if $oldFashionedRestrictions is really null, not also if it's a empty string, wich is passed from Article::loadPageData() in most of cases. This avoid to load twice that field from the database. Thank you, PHP. --- includes/Title.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/includes/Title.php b/includes/Title.php index d08a2c4759..d1a035d568 100644 --- a/includes/Title.php +++ b/includes/Title.php @@ -1693,7 +1693,7 @@ class Title { # Backwards-compatibility: also load the restrictions from the page record (old format). - if ( $oldFashionedRestrictions == NULL ) { + if ( $oldFashionedRestrictions === NULL ) { $oldFashionedRestrictions = $dbr->selectField( 'page', 'page_restrictions', array( 'page_id' => $this->getArticleId() ), __METHOD__ ); } -- 2.20.1