* Show a warning message when creating/editing a user (talk) page but the user does...
authorRaimond Spekking <raymond@users.mediawiki.org>
Tue, 27 Nov 2007 18:04:24 +0000 (18:04 +0000)
committerRaimond Spekking <raymond@users.mediawiki.org>
Tue, 27 Nov 2007 18:04:24 +0000 (18:04 +0000)
RELEASE-NOTES
includes/EditPage.php
languages/messages/MessagesDe.php
languages/messages/MessagesEn.php
maintenance/language/messages.inc

index 4252f7d..b6baf15 100644 (file)
@@ -80,6 +80,8 @@ it from source control: http://www.mediawiki.org/wiki/Download_from_SVN
   cleanly if database connections fail unpleasantly.
 * (bug 12028) Add Special:Listbots as shortcut for Special:Listusers/bot
 * (bug 9633) Add a predefined list of delete reasons to the deletion form
+* Show a warning message when creating/editing a user (talk) page but the user
+  does not exists
 
 === Bug fixes in 1.12 ===
 
index 9538669..45c4ad9 100644 (file)
@@ -623,17 +623,29 @@ class EditPage {
         */
        private function showIntro() {
                global $wgOut, $wgUser;
-               if( $this->suppressIntro ) return;
+               if( $this->suppressIntro )
+                       return;
+
+               # Show a warning message when someone creates/edits a user (talk) page but the user does not exists
+               if( $this->mTitle->getNamespace() == NS_USER || $this->mTitle->getNamespace() == NS_USER_TALK ) {
+                       $id = User::idFromName( $this->mTitle->getBaseText() );
+                       $ip = User::isIP( $this->mTitle->getBaseText() );
+
+                       if ( $id == 0 && !$ip ) {
+                               $wgOut->addWikiText( '<div class="mw-userpage-userdoesnotexist error">' . wfMsg( 'userpage-userdoesnotexist', $this->mTitle->getBaseText() ) . '</div>' );
+                       }
+               }
+
                if( !$this->showCustomIntro() && !$this->mTitle->exists() ) {
                        if( $wgUser->isLoggedIn() ) {
-                               $wgOut->addWikiText( wfMsg( 'newarticletext' ) );
+                               $wgOut->addWikiText( '<div class="mw-newarticletext">' . wfMsg( 'newarticletext' ) . '</div>' );
                        } else {
-                               $wgOut->addWikiText( wfMsg( 'newarticletextanon' ) );
+                               $wgOut->addWikiText( '<div class="mw-newarticletextanon">' . wfMsg( 'newarticletextanon' ) . '</div>' );
                        }
                        $this->showDeletionLog( $wgOut );
                }
        }
-       
+
        /**
         * Attempt to show a custom editing introduction, if supplied
         *
index 9c85af7..276d6d9 100644 (file)
@@ -692,6 +692,7 @@ Du kannst $1 oder einen der anderen [[{{MediaWiki:Grouppage-sysop}}|Administrato
 'newarticletext'            => 'Hier den Text der neuen Seite eintragen. Bitte nur in ganzen Sätzen schreiben und keine urheberrechtsgeschützten Texte anderer kopieren.',
 'anontalkpagetext'          => "---- ''Diese Seite dient dazu, einem nicht angemeldeten Benutzer Nachrichten zu hinterlassen. Wenn du mit den Kommentaren auf dieser Seite nichts anfangen kannst, richten sie sich vermutlich an einen früheren Inhaber deiner IP-Adresse und du kannst sie ignorieren.''",
 'noarticletext'             => '(Diese Seite enthält momentan noch keinen Text)',
+'userpage-userdoesnotexist' => 'Das Benutzerkonto „$1“ ist nicht vorhanden. Bitte prüfe, ob du diese Seite wirklich erstellen/bearbeiten willst.',
 'clearyourcache'            => "'''Hinweis:''' Leere nach dem Speichern den Browser-Cache, um die Änderungen zu sehen: '''Mozilla/Firefox:''' ''Shift-Strg-R'', '''Internet Explorer:''' ''Strg-F5'', '''Opera:''' ''F5'', '''Safari:''' ''⌘-R'', '''Konqueror:''' ''Strg-R''.",
 'usercssjsyoucanpreview'    => '<strong>Tipp:</strong> Benutze den Vorschau-Button, um dein neues css/js vor dem Speichern zu testen.',
 'usercsspreview'            => "== Vorschau Ihres Benutzer-CSS ==
index df15161..ff9b1c8 100644 (file)
@@ -1014,6 +1014,7 @@ If you are here by mistake, just click your browser's '''back''' button.",
 'anontalkpagetext'          => "----''This is the discussion page for an anonymous user who has not created an account yet or who does not use it. We therefore have to use the numerical IP address to identify him/her. Such an IP address can be shared by several users. If you are an anonymous user and feel that irrelevant comments have been directed at you, please [[Special:Userlogin|create an account or log in]] to avoid future confusion with other anonymous users.''",
 'noarticletext'             => 'There is currently no text in this page, you can [[Special:Search/{{PAGENAME}}|search for this page title]] in other pages or [{{fullurl:{{FULLPAGENAME}}|action=edit}} edit this page].',
 'noarticletextanon'         => '{{int:noarticletext}}', # don't translate or duplicate this message to other languages
+'userpage-userdoesnotexist' => 'User account "$1" is not registered. Please check if you want to create/edit this page.',
 'clearyourcache'            => "'''Note:''' After saving, you may have to bypass your browser's cache to see the changes. '''Mozilla / Firefox / Safari:''' hold down ''Shift'' while clicking ''Reload'', or press ''Ctrl-Shift-R'' (''Cmd-Shift-R'' on Apple Mac); '''IE:''' hold ''Ctrl'' while clicking ''Refresh'', or press ''Ctrl-F5''; '''Konqueror:''': simply click the ''Reload'' button, or press ''F5''; '''Opera''' users may need to completely clear their cache in ''Tools→Preferences''.",
 'usercssjsyoucanpreview'    => "<strong>Tip:</strong> Use the 'Show preview' button to test your new CSS/JS before saving.",
 'usercsspreview'            => "'''Remember that you are only previewing your user CSS, it has not yet been saved!'''",
index 119e825..36f894f 100644 (file)
@@ -490,6 +490,7 @@ $wgMessageStructure = array(
                'anontalkpagetext',
                'noarticletext',
                'noarticletextanon',
+               'userpage-userdoesnotexist',
                'clearyourcache',
                'usercssjsyoucanpreview',
                'usercsspreview',