r35885 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r35884‎ | r35885 | r35886 >
Date:21:33, 4 June 2008
Author:demon
Status:old
Tags:
Comment:
Fix bug 11771: Signup form now not shown if in read-only mode.
Modified paths:
  • /trunk/phase3/RELEASE-NOTES (modified) (history)
  • /trunk/phase3/includes/SpecialUserlogin.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/SpecialUserlogin.php
@@ -716,9 +716,15 @@
717717 global $wgAuth, $wgEmailConfirmToEdit;
718718
719719 $titleObj = SpecialPage::getTitleFor( 'Userlogin' );
720 -
 720+
721721 if ( $this->mType == 'signup' ) {
722 - if ( $wgUser->isBlockedFromCreateAccount() ) {
 722+ // Block signup here if in readonly. Keeps user from
 723+ // going through the process (filling out data, etc)
 724+ // and being informed later.
 725+ if ( wfReadOnly() ) {
 726+ $wgOut->readOnlyPage();
 727+ return;
 728+ } elseif ( $wgUser->isBlockedFromCreateAccount() ) {
723729 $this->userBlockedMessage();
724730 return;
725731 } elseif ( count( $permErrors = $titleObj->getUserPermissionsErrors( 'createaccount', $wgUser, true ) )>0 ) {
Index: trunk/phase3/RELEASE-NOTES
@@ -333,8 +333,8 @@
334334 * (bug 14367) Failed block no longer adds phantom watchlist entry
335335 * (bug 14385) "Move subpages" option no longer tries to move to invalid titles
336336 * (bug 14386) Fix subpage namespace oddity when moving a talk page
 337+* (bug 11771) Signup form now not shown if in read-only mode.
337338
338 -
339339 === API changes in 1.13 ===
340340
341341 * Fixing main page display in meta=siteinfo

Status & tagging log