X-Git-Url: http://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2Fapi%2FApiOptions.php;h=4b76906030a1abe3bdd72bca22b76163c91d9cb8;hb=54d50ef3921dc9f30dc4d863ddc471dc564998e9;hp=14bd089929db91fadb18c06318ab8411734540ec;hpb=b3f0565302d6923e49074a4a5efdeb97f120423f;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/api/ApiOptions.php b/includes/api/ApiOptions.php index 14bd089929..4b76906030 100644 --- a/includes/api/ApiOptions.php +++ b/includes/api/ApiOptions.php @@ -1,9 +1,5 @@ dieWithError( 'apierror-nochanges' ); } - $prefs = Preferences::getPreferences( $user, $this->getContext() ); + $preferencesFactory = MediaWikiServices::getInstance()->getPreferencesFactory(); + $prefs = $preferencesFactory->getFormDescriptor( $user, $this->getContext() ); $prefsKinds = $user->getOptionKinds( $this->getContext(), $changes ); $htmlForm = null; @@ -121,7 +120,7 @@ class ApiOptions extends ApiBase { $user->setOption( $key, $value ); $changed = true; } else { - $this->addWarning( [ 'apiwarn-validationfailed', wfEscapeWikitext( $key ), $validation ] ); + $this->addWarning( [ 'apiwarn-validationfailed', wfEscapeWikiText( $key ), $validation ] ); } }