From 758bbe8374e4cd3b6bbc067dee609fb172e9e664 Mon Sep 17 00:00:00 2001 From: Chad Horohoe Date: Wed, 11 Feb 2009 20:29:58 +0000 Subject: [PATCH] (bug 12746) We shouldn't be sending out new password e-mails when a wiki is in read-only mode. --- RELEASE-NOTES | 1 + includes/specials/SpecialUserlogin.php | 7 ++++++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/RELEASE-NOTES b/RELEASE-NOTES index 430bd80eab..43764fa956 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -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 diff --git a/includes/specials/SpecialUserlogin.php b/includes/specials/SpecialUserlogin.php index 650654ee1e..ce16b64448 100644 --- a/includes/specials/SpecialUserlogin.php +++ b/includes/specials/SpecialUserlogin.php @@ -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; -- 2.20.1