$defOpt = $wgDefaultUserOptions;
// Default language setting
- $defOpt['language'] = $defOpt['variant'] = $wgContLang->getCode();
+ $defOpt['language'] = $wgContLang->getCode();
+ foreach ( LanguageConverter::$languagesWithVariants as $langCode ) {
+ $defOpt[$langCode == $wgContLang->getCode() ? 'variant' : "variant-$langCode"] = $langCode;
+ }
foreach ( SearchEngine::searchableNamespaces() as $nsnum => $nsname ) {
$defOpt['searchNs' . $nsnum] = !empty( $wgNamespacesToBeSearchedDefault[$nsnum] );
}
}
/**
- * Get the user's current setting for a given option, as a boolean value.
+ * Get the user's current setting for a given option, as an integer value.
*
* @param string $oname The option to check
* @param int $defaultOverride A default value returned if the option does not exist
* null (default): Use the default ($wgCookieSecure) to set the secure attribute
*/
protected function setCookie( $name, $value, $exp = 0, $secure = null ) {
- $this->getRequest()->response()->setcookie( $name, $value, $exp, null, null, $secure );
+ $this->getRequest()->response()->setcookie( $name, $value, $exp, array(
+ 'secure' => $secure,
+ ) );
}
/**
} elseif ( $type === true ) {
$message = 'confirmemail_body_changed';
} else {
+ // Give grep a chance to find the usages:
+ // confirmemail_body_changed, confirmemail_body_set
$message = 'confirmemail_body_' . $type;
}