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 ===
*/
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
*
'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 ==
'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!'''",
'anontalkpagetext',
'noarticletext',
'noarticletextanon',
+ 'userpage-userdoesnotexist',
'clearyourcache',
'usercssjsyoucanpreview',
'usercsspreview',