save ArticleID when it is around, saves one query :-)
authorDomas Mituzas <midom@users.mediawiki.org>
Sat, 14 Jan 2006 03:10:42 +0000 (03:10 +0000)
committerDomas Mituzas <midom@users.mediawiki.org>
Sat, 14 Jan 2006 03:10:42 +0000 (03:10 +0000)
includes/Article.php

index 6a1c0e3..82891fc 100644 (file)
@@ -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;