(bug 7691) Show deletion log following noarticletext and newarticletext when creating...
authorDaniel Cannon <amidaniel@users.mediawiki.org>
Sat, 2 Jun 2007 00:41:16 +0000 (00:41 +0000)
committerDaniel Cannon <amidaniel@users.mediawiki.org>
Sat, 2 Jun 2007 00:41:16 +0000 (00:41 +0000)
RELEASE-NOTES
includes/Article.php
includes/EditPage.php
includes/ProtectionForm.php

index fa68540..e67261f 100644 (file)
@@ -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 ==
index 304b866..1621a9c 100644 (file)
@@ -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();
index bf89f3f..a30c79f 100644 (file)
@@ -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 );
                }
        }
 
index 54ac3a2..788b565 100644 (file)
@@ -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( "<h2>" . htmlspecialchars( LogPage::logName( 'protect' ) ) . "</h2>\n" );
                $logViewer = new LogViewer(
                        new LogReader(