From 0a12727c8c82b23d0f703128d08fca1f11cf4813 Mon Sep 17 00:00:00 2001 From: Chad Horohoe Date: Fri, 10 Jun 2011 03:27:37 +0000 Subject: [PATCH] (bug 29332) don't let install progress if user requests mediawiki-announce subscription but does not enter email. Thanks Sumana :) --- RELEASE-NOTES-1.19 | 2 ++ includes/installer/Installer.i18n.php | 2 ++ includes/installer/WebInstallerPage.php | 6 ++++++ 3 files changed, 10 insertions(+) diff --git a/RELEASE-NOTES-1.19 b/RELEASE-NOTES-1.19 index 4577727668..dad493d126 100644 --- a/RELEASE-NOTES-1.19 +++ b/RELEASE-NOTES-1.19 @@ -86,6 +86,8 @@ production. * (bug 29101) Special:FileDuplicateSearch shows silly message * (bug 29048) jQuery.tabIndex: firstTabIndex() should not output the same as lastTabIndex(). +* (bug 29332) Warn if user requests mediawiki-announce subscription but does not + enter an e-mail address. === API changes in 1.19 === * BREAKING CHANGE: action=watch now requires POST and token. diff --git a/includes/installer/Installer.i18n.php b/includes/installer/Installer.i18n.php index 1bf6fa2aa5..6a198e9e23 100644 --- a/includes/installer/Installer.i18n.php +++ b/includes/installer/Installer.i18n.php @@ -373,6 +373,8 @@ Specify a different username.', 'config-subscribe' => 'Subscribe to the [https://lists.wikimedia.org/mailman/listinfo/mediawiki-announce release announcements mailing list].', 'config-subscribe-help' => 'This is a low-volume mailing list used for release announcements, including important security announcements. You should subscribe to it and update your MediaWiki installation when new versions come out.', + 'config-subscribe-noemail' => 'You tried to subscribe to the release announcements mailing list without providing an e-mail address. +Please provide an e-mail address if you wish to subscribe to the mailing list.', 'config-almost-done' => 'You are almost done! You can now skip the remaining configuration and install the wiki right now.', 'config-optional-continue' => 'Ask me more questions.', diff --git a/includes/installer/WebInstallerPage.php b/includes/installer/WebInstallerPage.php index 65fa0a2b60..b09ea23d31 100644 --- a/includes/installer/WebInstallerPage.php +++ b/includes/installer/WebInstallerPage.php @@ -758,6 +758,12 @@ class WebInstaller_Name extends WebInstallerPage { $this->parent->showError( 'config-admin-error-bademail' ); $retVal = false; } + // If they asked to subscribe to mediawiki-announce but didn't give + // an e-mail, show an error. Bug 29332 + if( !$email && $this->getVar( '_Subscribe' ) ) { + $this->parent->showError( 'config-subscribe-noemail' ); + $retVal = false; + } return $retVal; } -- 2.20.1