* (bug 1765) Tidy causes corruption inside <gallery>
[lhc/web/wiklou.git] / includes / Article.php
index fe31b6c..1b83657 100644 (file)
@@ -34,6 +34,7 @@ class Article {
        var $mId, $mTable;
        var $mForUpdate;
        var $mOldId;
+       var $mRevIdFetched;
        /**#@-*/
 
        /**
@@ -68,6 +69,7 @@ class Article {
                $this->mTouched = '19700101000000';
                $this->mForUpdate = false;
                $this->mIsRedirect = false;
+               $this->mRevIdFetched = false;
        }
 
        /**
@@ -426,7 +428,9 @@ class Article {
                $this->mComment   = $revision->getComment();
                $this->mTimestamp = wfTimestamp( TS_MW, $revision->getTimestamp() );
                
+               $this->mRevIdFetched = $revision->getID();
                $this->mContentLoaded = true;
+               
                return $this->mContent;
        }
 
@@ -519,7 +523,7 @@ class Article {
        function isRedirect( $text = false ) {
                if ( $text === false ) {
                        $this->loadContent();
-                       $titleObj = Title::newFromRedirect( $this->mText );
+                       $titleObj = Title::newFromRedirect( $this->fetchRevisionText() );
                } else {
                        $titleObj = Title::newFromRedirect( $text );
                }
@@ -575,6 +579,11 @@ class Article {
                $this->loadLastEdit();
                return $this->mMinorEdit;
        }
+       
+       function getRevIdFetched() {
+               $this->loadLastEdit();
+               return $this->mRevIdFetched;
+       }
 
        function getContributors($limit = 0, $offset = 0) {
                $fname = 'Article::getContributors';