* @return DefaultPreferencesFactory
*/
protected static function getDefaultPreferencesFactory() {
- global $wgContLang;
$authManager = AuthManager::singleton();
$linkRenderer = MediaWikiServices::getInstance()->getLinkRenderer();
$config = MediaWikiServices::getInstance()->getMainConfig();
$preferencesFactory = new DefaultPreferencesFactory(
- $config, $wgContLang, $authManager, $linkRenderer
+ $config, MediaWikiServices::getInstance()->getContentLanguage(), $authManager,
+ $linkRenderer
);
return $preferencesFactory;
}
throw new Exception( __METHOD__ . '() is deprecated and does nothing' );
}
- /**
- * Handle the form submission if everything validated properly
- *
- * @deprecated since 1.31, use PreferencesFactory
- *
- * @param array $formData
- * @param HTMLForm $form
- * @return bool|Status|string
- */
- public static function tryFormSubmit( $formData, $form ) {
- $preferencesFactory = self::getDefaultPreferencesFactory();
- return $preferencesFactory->legacySaveFormData( $formData, $form );
- }
-
- /**
- * @param array $formData
- * @param HTMLForm $form
- * @return Status
- */
- public static function tryUISubmit( $formData, $form ) {
- $preferencesFactory = self::getDefaultPreferencesFactory();
- return $preferencesFactory->legacySubmitForm( $formData, $form );
- }
-
/**
* Get a list of all time zones
* @param Language $language Language used for the localized names