? 'prefs-help-email-required'
: 'prefs-help-email';
- if( $wgEnableUserEmail ) {
+ if ( $wgEnableUserEmail ) {
// additional messages when users can send email to each other
$helpMessages[] = 'prefs-help-email-others';
}
SpecialPage::getTitleFor( 'Confirmemail' ),
$context->msg( 'emailconfirmlink' )->escaped()
) . '<br />';
- $emailauthenticationclass="mw-email-not-authenticated";
+ $emailauthenticationclass = "mw-email-not-authenticated";
}
} else {
$disableEmailPrefs = true;
'section' => 'rendering/advancedrendering',
'options' => $stubThresholdOptions,
'size' => 20,
- 'label' => $context->msg( 'stub-threshold' )->text(), // Raw HTML message. Yay?
+ 'label-raw' => $context->msg( 'stub-threshold' )->text(), // Raw HTML message. Yay?
);
if ( $wgAllowUserCssPrefs ) {
* @param $defaultPreferences Array
*/
static function editingPreferences( $user, IContextSource $context, &$defaultPreferences ) {
- global $wgUseExternalEditor, $wgAllowUserCssPrefs;
+ global $wgAllowUserCssPrefs;
## Editing #####################################
$defaultPreferences['cols'] = array(
);
}
- if ( $wgUseExternalEditor ) {
- $defaultPreferences['externaleditor'] = array(
- 'type' => 'toggle',
- 'section' => 'editing/advancedediting',
- 'label-message' => 'tog-externaleditor',
- );
- $defaultPreferences['externaldiff'] = array(
- 'type' => 'toggle',
- 'section' => 'editing/advancedediting',
- 'label-message' => 'tog-externaldiff',
- );
- }
-
$defaultPreferences['forceeditsummary'] = array(
'type' => 'toggle',
'section' => 'editing/advancedediting',
'section' => 'editing/advancedediting',
'label-message' => 'tog-uselivepreview',
);
+
+ $defaultPreferences['useeditwarning'] = array(
+ 'type' => 'toggle',
+ 'section' => 'editing/advancedediting',
+ 'label-message' => 'tog-useeditwarning',
+ );
+
}
/**
$nsOptions = $wgContLang->getFormattedNamespaces();
$nsOptions[0] = $context->msg( 'blanknamespace' )->text();
foreach ( $nsOptions as $ns => $name ) {
- if ( $ns < 0 )
+ if ( $ns < 0 ) {
unset( $nsOptions[$ns] );
+ }
}
$defaultPreferences['searchnamespaces'] = array(
}
/**
+ * @param $context IContextSource
* @return array
*/
static function getTimezoneOptions( IContextSource $context ) {
$data[0] = intval( $data[0] );
$data[1] = intval( $data[1] );
$minDiff = abs( $data[0] ) * 60 + $data[1];
- if ( $data[0] < 0 ) $minDiff = - $minDiff;
+ if ( $data[0] < 0 ) {
+ $minDiff = - $minDiff;
+ }
} else {
$minDiff = intval( $data[0] ) * 60;
}
}
/**
+ * Handle the form submission if everything validated properly
+ *
* @param $formData
* @param $form PreferencesForm
* @param $entryPoint string
# via $wgHiddenPrefs, we don't want to destroy that setting in case the preference
# is subsequently re-enabled
# TODO: maintenance script to actually delete these
- foreach( $wgHiddenPrefs as $pref ) {
+ foreach ( $wgHiddenPrefs as $pref ) {
# If the user has not set a non-default value here, the default will be returned
# and subsequently discarded
$formData[$pref] = $user->getOption( $pref, null, true );