(bug 21520) Anonymous previews now also give a warning about not being
authorPlatonides <platonides@users.mediawiki.org>
Mon, 29 Mar 2010 22:44:59 +0000 (22:44 +0000)
committerPlatonides <platonides@users.mediawiki.org>
Mon, 29 Mar 2010 22:44:59 +0000 (22:44 +0000)
logged in (anonpreviewwarning).

RELEASE-NOTES
includes/EditPage.php
languages/messages/MessagesEn.php

index ea7a829..c93da99 100644 (file)
@@ -67,6 +67,8 @@ it from source control: http://www.mediawiki.org/wiki/Download_from_SVN
 * (bug 22991) wgUserGroups JavaScript variable now reports * group for
   anonymous users instead of null.
 * (bug 22627) Remove PHP notice when deleting a page only hidden users edited.
+* (bug 21520) Anonymous previews now also gives a warning about not being 
+logged in (anonpreviewwarning).
 
 == API changes in 1.17 ==
 * (bug 22738) Allow filtering by action type on query=logevent
index 10efc31..47ec0a4 100644 (file)
@@ -1401,8 +1401,12 @@ HTML
 
                if ( wfReadOnly() ) {
                        $wgOut->wrapWikiMsg( "<div id=\"mw-read-only-warning\">\n$1\n</div>", array( 'readonlywarning', wfReadOnlyReason() ) );
-               } elseif ( $wgUser->isAnon() && $this->formtype != 'preview' ) {
-                       $wgOut->wrapWikiMsg( "<div id=\"mw-anon-edit-warning\">\n$1</div>", 'anoneditwarning' );
+               } elseif ( $wgUser->isAnon() ) {
+                       if ( $this->formtype != 'preview' ) {
+                               $wgOut->wrapWikiMsg( "<div id=\"mw-anon-edit-warning\">\n$1</div>", 'anoneditwarning' );
+                       } else {
+                               $wgOut->wrapWikiMsg( "<div id=\"mw-anon-preview-warning\">\n$1</div>", 'anonpreviewwarning' );
+                       }
                } else {
                        if ( $this->isCssJsSubpage ) {
                                # Check the skin exists
index 37ae00e..bc9fc1d 100644 (file)
@@ -1,3 +1,4 @@
+
 <?php
 /**
  * This is the default English localisation file
@@ -1190,6 +1191,7 @@ You may have already successfully changed your password or requested a new tempo
 'showdiff'                         => 'Show changes',
 'anoneditwarning'                  => "'''Warning:''' You are not logged in.
 Your IP address will be recorded in this page's edit history.",
+'anonpreviewwarning'               => "''You are not logged in. Saving will record your IP address in this page's edit history.''",
 'missingsummary'                   => "'''Reminder:''' You have not provided an edit summary.
 If you click Save again, your edit will be saved without one.",
 'missingcommenttext'               => 'Please enter a comment below.',