selected when the action is "purge".
* (bug 14267) Support a MediaWiki:Mainpage-nstab override for the subject namespace
tab on the mainpage of a wiki.
+* (bug 10158) Do not mention allowing others to contact you when the feature
+ is disabled ($wgEnableUserEmail=false)
=== API changes in 1.18 ===
* (bug 26339) Throw warning when truncating an overlarge API result
* 'help-message' -- message key for a message to use as a help text.
* can be an array of msg key and then parameters to
* the message.
+ * Overwrites 'help-messages'.
+ * 'help-messages' -- array of message key. As above, each item can
+ * be an array of msg key and then parameters.
+ * Overwrites 'help-message'.
* 'required' -- passed through to the object, indicating that it
* is a required field.
* 'size' -- the length of text fields
# Never mind
$helptext = null;
}
+ } elseif ( isset( $this->mParams['help-messages'] ) ) {
+ # help-message can be passed a message key (string) or an array containing
+ # a message key and additional parameters. This makes it impossible to pass
+ # an array of message key
+ foreach( $this->mParams['help-messages'] as $msg ) {
+ $candidate = wfMsgExt( $msg, 'parseinline' );
+ if( wfEmptyMsg( $msg ) ) {
+ $candidate = null;
+ }
+ $helptext .= $candidate; // append message
+ }
} elseif ( isset( $this->mParams['help'] ) ) {
$helptext = $this->mParams['help'];
}
global $wgEnableEmail;
if ( $wgEnableEmail ) {
global $wgEmailConfirmToEdit;
+ global $wgEnableUserEmail;
+
+ $helpMessages[] = $wgEmailConfirmToEdit
+ ? 'prefs-help-email-required'
+ : 'prefs-help-email' ;
+ $helpMessages[] = $wgEnableUserEmail
+ ? 'prefs-help-email-others'
+ : 'tototo' ;
$defaultPreferences['emailaddress'] = array(
'type' => $wgAuth->allowPropChange( 'emailaddress' ) ? 'email' : 'info',
'default' => $user->getEmail(),
'section' => 'personal/email',
'label-message' => 'youremail',
- 'help-message' => $wgEmailConfirmToEdit
- ? 'prefs-help-email-required'
- : 'prefs-help-email',
+ 'help-messages' => $helpMessages,
'validation-callback' => array( 'Preferences', 'validateEmail' ),
);
- global $wgEnableUserEmail, $wgEmailAuthentication;
+ global $wgEmailAuthentication;
$disableEmailPrefs = false;
* @private
*/
function mainLoginForm( $msg, $msgtype = 'error' ) {
- global $wgUser, $wgOut, $wgHiddenPrefs, $wgEnableEmail;
+ global $wgUser, $wgOut, $wgHiddenPrefs;
+ global $wgEnableEmail, $wgEnableUserEmail;
global $wgRequest, $wgLoginLanguageSelector;
global $wgAuth, $wgEmailConfirmToEdit, $wgCookieExpiration;
global $wgSecureLogin;
$template->set( 'userealname', !in_array( 'realname', $wgHiddenPrefs ) );
$template->set( 'useemail', $wgEnableEmail );
$template->set( 'emailrequired', $wgEmailConfirmToEdit );
+ $template->set( 'emailothers', $wgEnableUserEmail );
$template->set( 'canreset', $wgAuth->allowPasswordChange() );
$template->set( 'canremember', ( $wgCookieExpiration > 0 ) );
$template->set( 'usereason', $wgUser->isLoggedIn() );
'size' => '20'
) ); ?>
<div class="prefsectiontip">
- <?php if( $this->data['emailrequired'] ) {
- $this->msgWiki('prefs-help-email-required');
- } else {
- $this->msgWiki('prefs-help-email');
- } ?>
+ <?php // duplicated in Preferences.php profilePreferences()
+ if( $this->data['emailrequired'] ) {
+ $this->msgWiki('prefs-help-email-required');
+ } else {
+ $this->msgWiki('prefs-help-email');
+ }
+ if( $this->data['emailothers'] ) {
+ $this->msgWiki('prefs-help-email-others');
+ } ?>
</div>
</td>
<td></td>
'email' => 'E-mail',
'prefs-help-realname' => 'Real name is optional.
If you choose to provide it, this will be used for giving you attribution for your work.',
-'prefs-help-email' => 'E-mail address is optional, but is needed for password resets, should you forget your password.
-You can also choose to let others contact you through your user or talk page without needing to reveal your identity.',
+'prefs-help-email' => 'E-mail address is optional, but is needed for password resets, should you forget your password.',
+'prefs-help-email-others' => 'You can also choose to let others contact you through your user or talk page without needing to reveal your identity.',
'prefs-help-email-required' => 'E-mail address is required.',
'prefs-info' => 'Basic information',
'prefs-i18n' => 'Internationalisation',
'prefs-help-gender',
'email',
'prefs-help-realname',
+
+ # 3 messages depending upon wgEmailConfirmToEdit and $wgEnableUserEmail
'prefs-help-email',
+ 'prefs-help-email-others',
'prefs-help-email-required',
+
'prefs-info',
'prefs-i18n',
'prefs-signature',