* Don't show empty-page text in 'Show changes' on new page
authorBrion Vibber <brion@users.mediawiki.org>
Wed, 29 Jun 2005 00:31:07 +0000 (00:31 +0000)
committerBrion Vibber <brion@users.mediawiki.org>
Wed, 29 Jun 2005 00:31:07 +0000 (00:31 +0000)
Changed $noredir on Article::fetchContent() to a more reasonable default.

RELEASE-NOTES
includes/Article.php
includes/EditPage.php

index 4375dbe..f6d5635 100644 (file)
@@ -413,6 +413,7 @@ Various bugfixes, small features, and a few experimental things:
 * (bug 2572) Fix edit conflict handling
 * (bug 2595) Show "Earlier" and "Latest" links on history go to the first/last
   page in the article history pager.
+* Don't show empty-page text in 'Show changes' on new page
 
 
 === Caveats ===
index fdefb53..e1a5ab0 100644 (file)
@@ -325,11 +325,11 @@ class Article {
        /**
         * Get text of an article from database
         * @param int $oldid 0 for whatever the latest revision is
-        * @param bool $noredir Set to true to avoid following redirects
+        * @param bool $noredir Set to false to follow redirects
         * @param bool $globalTitle Set to true to change the global $wgTitle object when following redirects or other unexpected title changes
         * @return string
         */
-       function fetchContent( $oldid = 0, $noredir = false, $globalTitle = false ) {
+       function fetchContent( $oldid = 0, $noredir = true, $globalTitle = false ) {
                if ( $this->mContentLoaded ) {
                        return $this->mContent;
                }
@@ -524,7 +524,7 @@ class Article {
        function isRedirect( $text = false ) {
                if ( $text === false ) {
                        $this->loadContent();
-                       $titleObj = Title::newFromRedirect( $this->fetchContent( false, true ) );
+                       $titleObj = Title::newFromRedirect( $this->fetchContent() );
                } else {
                        $titleObj = Title::newFromRedirect( $text );
                }
index f159470..43d9dc5 100644 (file)
@@ -1100,7 +1100,7 @@ END
         */
        function getDiff() {
                require_once( 'DifferenceEngine.php' );
-               $oldtext = $this->mArticle->getContent( true );
+               $oldtext = $this->mArticle->fetchContent();
                $newtext = $this->mArticle->getTextOfLastEditWithSectionReplacedOrAdded(
                        $this->section, $this->textbox1, $this->summary, $this->edittime );
                $oldtitle = wfMsg( 'currentrev' );