From b941e5395d8703b1231fcbd815281b23ce16c69a Mon Sep 17 00:00:00 2001 From: Rob Church Date: Sat, 4 Feb 2006 18:42:43 +0000 Subject: [PATCH] Add warning for anon. edits --- RELEASE-NOTES | 2 +- includes/EditPage.php | 3 +++ languages/Messages.php | 1 + 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/RELEASE-NOTES b/RELEASE-NOTES index a2cc5398ac..80572cd498 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -592,7 +592,7 @@ fully support the editing toolbar, but was found to be too confusing. * (bug 4303) Add $wgFavicon to change the shorticon icon link from the default /favicon.ico or disable it (if set to false) * (bug 3347) strip linebreaks in math error source - +* (bug 4841) Warning for non-logged-in edits === Caveats === diff --git a/includes/EditPage.php b/includes/EditPage.php index 3fcc54ce72..d5c4095cb5 100644 --- a/includes/EditPage.php +++ b/includes/EditPage.php @@ -722,7 +722,10 @@ class EditPage { $wgOut->addWikiText( wfMsg( 'readonlywarning' ) ); } else if ( $this->isCssJsSubpage and 'preview' != $this->formtype) { $wgOut->addWikiText( wfMsg( 'usercssjsyoucanpreview' )); + } else if( $wgUser->isAnon() && $this->formtype != 'preview' ) { + $wgOut->addWikiText( wfMsg( 'anoneditwarning' ) ); } + if( $this->mTitle->isProtected('edit') ) { $wgOut->addWikiText( wfMsg( 'protectedpagewarning' ) ); } diff --git a/languages/Messages.php b/languages/Messages.php index 5733cfd9af..69c9004937 100644 --- a/languages/Messages.php +++ b/languages/Messages.php @@ -450,6 +450,7 @@ format. Please enter a well-formatted address or empty that field.', 'preview' => 'Preview', 'showpreview' => 'Show preview', 'showdiff' => 'Show changes', +'anoneditwarning' => 'You are not logged in. Your IP address will be recorded in this page\'s edit history.', 'blockedtitle' => 'User is blocked', 'blockedtext' => 'Your user name or IP address has been blocked by $1. The reason given is this:
\'\'$2\'\'

You may contact $1 or one of the other -- 2.20.1