From: Alexandre Emsenhuber Date: Tue, 29 Apr 2008 19:18:58 +0000 (+0000) Subject: Only load old page_restrictions field if $oldFashionedRestrictions is really null... X-Git-Tag: 1.31.0-rc.0~48000 X-Git-Url: http://git.cyclocoop.org/%22.%24redirect_annul.%22?a=commitdiff_plain;h=9b748e7588ef0072b92a7719a4b459d49c3a3367;p=lhc%2Fweb%2Fwiklou.git 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. --- 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__ ); }