(bug 14698) Make "Block account creation" work as advertised. :)
authorChad Horohoe <demon@users.mediawiki.org>
Wed, 2 Jul 2008 14:40:48 +0000 (14:40 +0000)
committerChad Horohoe <demon@users.mediawiki.org>
Wed, 2 Jul 2008 14:40:48 +0000 (14:40 +0000)
RELEASE-NOTES
includes/specials/SpecialUserlogin.php

index 081978e..0608312 100644 (file)
@@ -407,6 +407,8 @@ it from source control: http://www.mediawiki.org/wiki/Download_from_SVN
 * (bug 14687) OutputPage::addStyle() now adds type="text/css" like it should.
 * OpenSearch cleanup; Firefox now sends you to the search page for empty
   searches instead of the domain root (which may not even be a wiki).
+* (bug 14698) Blocks without "block account creation" set no longer block
+  account creation.
 
 
 === API changes in 1.13 ===
index 179ef3f..d311783 100644 (file)
@@ -727,7 +727,9 @@ class LoginForm {
                        } elseif ( $wgUser->isBlockedFromCreateAccount() ) {
                                $this->userBlockedMessage();
                                return;
-                       } elseif ( count( $permErrors = $titleObj->getUserPermissionsErrors( 'createaccount', $wgUser, true ) )>0 ) {
+                       }
+                       // Supress 'blockedtext' error here, we already checked above.
+                        elseif ( count( $permErrors = $titleObj->getUserPermissionsErrors( 'createaccount', $wgUser, true, array('blockedtext') ) )>0 ) {
                                $wgOut->showPermissionsErrorPage( $permErrors, 'createaccount' );
                                return;
                        }