From 5acfd2e095dae1b5fbbd7506f907a9ee5072a84f Mon Sep 17 00:00:00 2001 From: Aaron Schulz Date: Tue, 9 Dec 2008 22:24:21 +0000 Subject: [PATCH] Delay restriction fetching query --- includes/Article.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/includes/Article.php b/includes/Article.php index 71939042cd..88b182e140 100644 --- a/includes/Article.php +++ b/includes/Article.php @@ -371,8 +371,9 @@ class Article { $this->mTitle->mArticleID = $data->page_id; $this->mTitle->mTouched = wfTimestamp( TS_MW, $data->page_touched ); - # Old-fashioned restrictions. - $this->mTitle->loadRestrictions( $data->page_restrictions ); + # Old-fashioned restrictions + if( $data->page_restrictions ) + $this->mTitle->loadRestrictions( $data->page_restrictions ); $this->mCounter = $data->page_counter; $this->mTouched = wfTimestamp( TS_MW, $data->page_touched ); @@ -686,7 +687,7 @@ class Article { # Try file cache if( $oldid === 0 && $this->checkTouched() ) { - $wgOut->setETag($parserCache->getETag($this, $wgUser)); + $wgOut->setETag( $parserCache->getETag($this,$wgUser) ); if( $wgOut->checkLastModified( $this->getTouched() ) ){ wfProfileOut( __METHOD__ ); return; -- 2.20.1