From: Chad Horohoe Date: Wed, 4 Jun 2008 21:33:01 +0000 (+0000) Subject: Fix bug 11771: Signup form now not shown if in read-only mode. X-Git-Tag: 1.31.0-rc.0~47166 X-Git-Url: http://git.cyclocoop.org/%22%20.%20generer_url_ecrire%28%22suivi_revisions%22%29%20.%20%22?a=commitdiff_plain;h=e4f94326a75bbac85850c8852f5ef99a31377493;p=lhc%2Fweb%2Fwiklou.git Fix bug 11771: Signup form now not shown if in read-only mode. --- diff --git a/RELEASE-NOTES b/RELEASE-NOTES index 4739e15d1e..776f82934c 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -333,7 +333,7 @@ it from source control: http://www.mediawiki.org/wiki/Download_from_SVN * (bug 14367) Failed block no longer adds phantom watchlist entry * (bug 14385) "Move subpages" option no longer tries to move to invalid titles * (bug 14386) Fix subpage namespace oddity when moving a talk page - +* (bug 11771) Signup form now not shown if in read-only mode. === API changes in 1.13 === diff --git a/includes/SpecialUserlogin.php b/includes/SpecialUserlogin.php index 57737d4da2..f0bfff3439 100644 --- a/includes/SpecialUserlogin.php +++ b/includes/SpecialUserlogin.php @@ -716,9 +716,15 @@ class LoginForm { global $wgAuth, $wgEmailConfirmToEdit; $titleObj = SpecialPage::getTitleFor( 'Userlogin' ); - + if ( $this->mType == 'signup' ) { - if ( $wgUser->isBlockedFromCreateAccount() ) { + // Block signup here if in readonly. Keeps user from + // going through the process (filling out data, etc) + // and being informed later. + if ( wfReadOnly() ) { + $wgOut->readOnlyPage(); + return; + } elseif ( $wgUser->isBlockedFromCreateAccount() ) { $this->userBlockedMessage(); return; } elseif ( count( $permErrors = $titleObj->getUserPermissionsErrors( 'createaccount', $wgUser, true ) )>0 ) {