From: Daniel Cannon Date: Sat, 2 Jun 2007 00:41:16 +0000 (+0000) Subject: (bug 7691) Show deletion log following noarticletext and newarticletext when creating... X-Git-Tag: 1.31.0-rc.0~52727 X-Git-Url: http://git.cyclocoop.org/%7B%7B%20url_for%28%27admin_vote_add%27%29%20%7D%7D?a=commitdiff_plain;h=b0d24a3a106b1e7b439161ae1df897fbbdfaa703;p=lhc%2Fweb%2Fwiklou.git (bug 7691) Show deletion log following noarticletext and newarticletext when creating a new page. --- diff --git a/RELEASE-NOTES b/RELEASE-NOTES index fa685403dd..e67261f806 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -51,6 +51,8 @@ it from source control: http://www.mediawiki.org/wiki/Download_from_SVN * Added $wgArticleRobotPolicies * (bug 10076) Additional parameter $7 added to MediaWiki:Blockedtext containing, the ip, ip range, or username whose block is affecting the +* (bug 7691) Deletion log now shown when creating a new article, following + MediaWiki:Noarticletext(anon) or MediaWiki:Newarticletext(anon). current user. == Bugfixes since 1.10 == diff --git a/includes/Article.php b/includes/Article.php index 304b8660e9..1621a9c401 100644 --- a/includes/Article.php +++ b/includes/Article.php @@ -852,6 +852,14 @@ class Article { ); } + /** + * If it's a non-existant page, stick the deletion log before the "noarticle" message. + * This won't appear when editing a new page, but will when viewing a nonexistant one. + */ + if ( 0 == $this->getID() ) { + $this->showLogExtract( $wgOut ); + } + # Trackbacks if ($wgUseTrackbacks) $this->addTrackbacks(); diff --git a/includes/EditPage.php b/includes/EditPage.php index bf89f3f937..a30c79f9ac 100644 --- a/includes/EditPage.php +++ b/includes/EditPage.php @@ -604,6 +604,8 @@ class EditPage { $wgOut->addWikiText( wfMsg( 'newarticletext' ) ); else $wgOut->addWikiText( wfMsg( 'newarticletextanon' ) ); + // Show deletion log when editing new article. + $this->mArticle->showLogExtract( $wgOut ); } } diff --git a/includes/ProtectionForm.php b/includes/ProtectionForm.php index 54ac3a2913..788b565dfb 100644 --- a/includes/ProtectionForm.php +++ b/includes/ProtectionForm.php @@ -360,7 +360,7 @@ class ProtectionForm { * @access private */ function showLogExtract( &$out ) { - # Show relevant lines from the deletion log: + # Show relevant lines from the protection log: $out->addHTML( "

" . htmlspecialchars( LogPage::logName( 'protect' ) ) . "

\n" ); $logViewer = new LogViewer( new LogReader(