Drop pre-MW1.32 Special:Preferences (non-OOUI) compatability

Depends-On: I65b89385c3ec28ef01b86dd933dae3801e503631
Change-Id: Id9c840e979b723806883bb3e63d7f2f691fea629
This commit is contained in:
James D. Forrester 2018-09-26 16:15:51 -07:00 committed by Jforrester
parent 46273bedc3
commit 3546c62f19
2 changed files with 7 additions and 17 deletions

View file

@ -6,7 +6,7 @@
"descriptionmsg": "oathauth-desc",
"type": "other",
"requires": {
"MediaWiki": ">= 1.31.0"
"MediaWiki": ">= 1.32.0"
},
"license-name": "GPL-2.0-or-later AND GPL-3.0-or-later",
"AutoloadClasses": {

View file

@ -122,22 +122,12 @@ class OATHAuthHooks {
$msg = $oathUser->getKey() !== null ? 'oathauth-disable' : 'oathauth-enable';
// TODO: Drop this when isOouiEnabled always returns true.
if ( SpecialPreferences::isOouiEnabled( RequestContext::getMain() ) ) {
$control = new \OOUI\ButtonWidget( [
'href' => SpecialPage::getTitleFor( 'OATH' )->getLinkURL( [
'returnto' => SpecialPage::getTitleFor( 'Preferences' )->getPrefixedText()
] ),
'label' => wfMessage( $msg )->text(),
] );
} else {
$control = Linker::link(
SpecialPage::getTitleFor( 'OATH' ),
wfMessage( $msg )->escaped(),
[],
[ 'returnto' => SpecialPage::getTitleFor( 'Preferences' )->getPrefixedText() ]
);
}
$control = new \OOUI\ButtonWidget( [
'href' => SpecialPage::getTitleFor( 'OATH' )->getLinkURL( [
'returnto' => SpecialPage::getTitleFor( 'Preferences' )->getPrefixedText()
] ),
'label' => wfMessage( $msg )->text(),
] );
$preferences[$msg] = [
'type' => 'info',