From: Brion Vibber Date: Wed, 29 Jun 2005 00:31:07 +0000 (+0000) Subject: * Don't show empty-page text in 'Show changes' on new page X-Git-Tag: 1.5.0beta2~142 X-Git-Url: https://git.cyclocoop.org/admin/?a=commitdiff_plain;h=5a3133d4d87a62794ea3be8acd1dc2672bfeebe8;p=lhc%2Fweb%2Fwiklou.git * Don't show empty-page text in 'Show changes' on new page Changed $noredir on Article::fetchContent() to a more reasonable default. --- diff --git a/RELEASE-NOTES b/RELEASE-NOTES index 4375dbec2c..f6d5635c34 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -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 === diff --git a/includes/Article.php b/includes/Article.php index fdefb53db4..e1a5ab01f4 100644 --- a/includes/Article.php +++ b/includes/Article.php @@ -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 ); } diff --git a/includes/EditPage.php b/includes/EditPage.php index f1594707ad..43d9dc55bc 100644 --- a/includes/EditPage.php +++ b/includes/EditPage.php @@ -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' );