(bug 12746) We shouldn't be sending out new password e-mails when a wiki is in read...
authorChad Horohoe <demon@users.mediawiki.org>
Wed, 11 Feb 2009 20:29:58 +0000 (20:29 +0000)
committerChad Horohoe <demon@users.mediawiki.org>
Wed, 11 Feb 2009 20:29:58 +0000 (20:29 +0000)
RELEASE-NOTES
includes/specials/SpecialUserlogin.php

index 430bd80..43764fa 100644 (file)
@@ -160,6 +160,7 @@ it from source control: http://www.mediawiki.org/wiki/Download_from_SVN
 * (bug 7509) Separation strings should be configurable
 * (bug 17420) Send the correct content type from action=raw when the HTML file 
   cache is enabled.
+* (bug 12746) Do not allow new password e-mails when wiki is in read-only mode
 
 == API changes in 1.15 ==
 * (bug 16858) Revamped list=deletedrevs to make listing deleted contributions
index 650654e..ce16b64 100644 (file)
@@ -593,7 +593,12 @@ class LoginForm {
         */
        function mailPassword() {
                global $wgUser, $wgOut, $wgAuth;
-
+               
+               if ( wfReadOnly() ) {
+                       $wgOut->readOnlyPage();
+                       return false;
+               }
+               
                if( !$wgAuth->allowPasswordChange() ) {
                        $this->mainLoginForm( wfMsg( 'resetpass_forbidden' ) );
                        return;