From 5c033c37c5c22482ca90b63957d7ec969c166325 Mon Sep 17 00:00:00 2001 From: Domas Mituzas Date: Sat, 14 Jan 2006 03:10:42 +0000 Subject: [PATCH] save ArticleID when it is around, saves one query :-) --- includes/Article.php | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/includes/Article.php b/includes/Article.php index 6a1c0e3132..82891fc7bc 100644 --- a/includes/Article.php +++ b/includes/Article.php @@ -91,11 +91,8 @@ class Article { } else { return $rt->getFullURL(); } - } elseif( $rt->exists() ) { - // Internal redirects can be handled relatively gracefully. - // We may have to change to another Article subclass, though. - return $rt; - } + } + return $rt; } } @@ -427,6 +424,7 @@ class Article { * @access private */ function loadPageData( $data ) { + $this->mTitle->mArticleID = $data->page_id; $this->mTitle->loadRestrictions( $data->page_restrictions ); $this->mTitle->mRestrictionsLoaded = true; -- 2.20.1