r34027 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r34026‎ | r34027 | r34028 >
Date:19:18, 29 April 2008
Author:ialex
Status:old
Tags:
Comment:
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.
Modified paths:
  • /trunk/phase3/includes/Title.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/Title.php
@@ -1693,7 +1693,7 @@
16941694
16951695 # Backwards-compatibility: also load the restrictions from the page record (old format).
16961696
1697 - if ( $oldFashionedRestrictions == NULL ) {
 1697+ if ( $oldFashionedRestrictions === NULL ) {
16981698 $oldFashionedRestrictions = $dbr->selectField( 'page', 'page_restrictions', array( 'page_id' => $this->getArticleId() ), __METHOD__ );
16991699 }
17001700

Status & tagging log