r25714 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r25713‎ | r25714 | r25715 >
Date:06:00, 10 September 2007
Author:werdna
Status:old
Tags:
Comment:
* (bug 9611) Supply the blocker and reason for the cantcreateaccounttext message.
Modified paths:
  • /trunk/phase3/RELEASE-NOTES (modified) (history)
  • /trunk/phase3/includes/SpecialUserlogin.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/SpecialUserlogin.php
@@ -228,7 +228,7 @@
229229 return false;
230230 }
231231
232 - # Check anonymous user ($wgUser) limitations :
 232+ #Â Check anonymous user ($wgUser) limitations :
233233 if (!$wgUser->isAllowedToCreateAccount()) {
234234 $this->userNotPrivilegedMessage();
235235 return false;
@@ -596,7 +596,7 @@
597597
598598 /** */
599599 function userBlockedMessage() {
600 - global $wgOut;
 600+ global $wgOut, $wgUser;
601601
602602 # Let's be nice about this, it's likely that this feature will be used
603603 # for blocking large numbers of innocent people, e.g. range blocks on
@@ -611,7 +611,10 @@
612612 $wgOut->setArticleRelated( false );
613613
614614 $ip = wfGetIP();
615 - $wgOut->addWikiText( wfMsg( 'cantcreateaccounttext', $ip ) );
 615+ $blocker = User::whoIs($wgUser->mBlock->mBy);
 616+ $block_reason = $wgUser->mBlock->mReason;
 617+
 618+ $wgOut->addWikiText( wfMsg( 'cantcreateaccounttext', $ip, $block_reason, $blocker ) );
616619 $wgOut->returnToMain( false );
617620 }
618621
Index: trunk/phase3/RELEASE-NOTES
@@ -36,6 +36,8 @@
3737 translations
3838 * (bug 11211) Pass, as a parameter to the protectedpagetext interface
3939 message, the level of protection.
 40+* (bug 9611) Supply the blocker and reason for the cantcreateaccounttext
 41+ message.
4042
4143 === API changes in 1.12 ===
4244

Follow-up revisions

RevisionCommit summaryAuthorDate
r25723Change the cantcreateaccounttext message, to take advantage of the features f...werdna09:48, 10 September 2007
r25754Merged revisions 25607-25751 via svnmerge from...david23:02, 10 September 2007
r25763r25714/25723 changed message 'cantcreateaccounttext' in a relevant manner, so...raymond06:04, 11 September 2007
r25804Merged revisions 25752-25803 via svnmerge from...david02:25, 12 September 2007

Status & tagging log