From 318e4fa4ed28618d3035bc0090e7f19c7ccda4aa Mon Sep 17 00:00:00 2001 From: Platonides Date: Mon, 29 Mar 2010 22:44:59 +0000 Subject: [PATCH] (bug 21520) Anonymous previews now also give a warning about not being logged in (anonpreviewwarning). --- RELEASE-NOTES | 2 ++ includes/EditPage.php | 8 ++++++-- languages/messages/MessagesEn.php | 2 ++ 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/RELEASE-NOTES b/RELEASE-NOTES index ea7a829b31..c93da9907c 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -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 diff --git a/includes/EditPage.php b/includes/EditPage.php index 10efc315f2..47ec0a415d 100644 --- a/includes/EditPage.php +++ b/includes/EditPage.php @@ -1401,8 +1401,12 @@ HTML if ( wfReadOnly() ) { $wgOut->wrapWikiMsg( "
\n$1\n
", array( 'readonlywarning', wfReadOnlyReason() ) ); - } elseif ( $wgUser->isAnon() && $this->formtype != 'preview' ) { - $wgOut->wrapWikiMsg( "
\n$1
", 'anoneditwarning' ); + } elseif ( $wgUser->isAnon() ) { + if ( $this->formtype != 'preview' ) { + $wgOut->wrapWikiMsg( "
\n$1
", 'anoneditwarning' ); + } else { + $wgOut->wrapWikiMsg( "
\n$1
", 'anonpreviewwarning' ); + } } else { if ( $this->isCssJsSubpage ) { # Check the skin exists diff --git a/languages/messages/MessagesEn.php b/languages/messages/MessagesEn.php index 37ae00e9c1..bc9fc1d43e 100644 --- a/languages/messages/MessagesEn.php +++ b/languages/messages/MessagesEn.php @@ -1,3 +1,4 @@ + '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.', -- 2.20.1