mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/OATHAuth
synced 2024-11-24 08:14:15 +00:00
Drop pre-MW1.32 Special:Preferences (non-OOUI) compatability
Depends-On: I65b89385c3ec28ef01b86dd933dae3801e503631 Change-Id: Id9c840e979b723806883bb3e63d7f2f691fea629
This commit is contained in:
parent
46273bedc3
commit
3546c62f19
|
@ -6,7 +6,7 @@
|
||||||
"descriptionmsg": "oathauth-desc",
|
"descriptionmsg": "oathauth-desc",
|
||||||
"type": "other",
|
"type": "other",
|
||||||
"requires": {
|
"requires": {
|
||||||
"MediaWiki": ">= 1.31.0"
|
"MediaWiki": ">= 1.32.0"
|
||||||
},
|
},
|
||||||
"license-name": "GPL-2.0-or-later AND GPL-3.0-or-later",
|
"license-name": "GPL-2.0-or-later AND GPL-3.0-or-later",
|
||||||
"AutoloadClasses": {
|
"AutoloadClasses": {
|
||||||
|
|
|
@ -122,22 +122,12 @@ class OATHAuthHooks {
|
||||||
|
|
||||||
$msg = $oathUser->getKey() !== null ? 'oathauth-disable' : 'oathauth-enable';
|
$msg = $oathUser->getKey() !== null ? 'oathauth-disable' : 'oathauth-enable';
|
||||||
|
|
||||||
// TODO: Drop this when isOouiEnabled always returns true.
|
$control = new \OOUI\ButtonWidget( [
|
||||||
if ( SpecialPreferences::isOouiEnabled( RequestContext::getMain() ) ) {
|
'href' => SpecialPage::getTitleFor( 'OATH' )->getLinkURL( [
|
||||||
$control = new \OOUI\ButtonWidget( [
|
'returnto' => SpecialPage::getTitleFor( 'Preferences' )->getPrefixedText()
|
||||||
'href' => SpecialPage::getTitleFor( 'OATH' )->getLinkURL( [
|
] ),
|
||||||
'returnto' => SpecialPage::getTitleFor( 'Preferences' )->getPrefixedText()
|
'label' => wfMessage( $msg )->text(),
|
||||||
] ),
|
] );
|
||||||
'label' => wfMessage( $msg )->text(),
|
|
||||||
] );
|
|
||||||
} else {
|
|
||||||
$control = Linker::link(
|
|
||||||
SpecialPage::getTitleFor( 'OATH' ),
|
|
||||||
wfMessage( $msg )->escaped(),
|
|
||||||
[],
|
|
||||||
[ 'returnto' => SpecialPage::getTitleFor( 'Preferences' )->getPrefixedText() ]
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
$preferences[$msg] = [
|
$preferences[$msg] = [
|
||||||
'type' => 'info',
|
'type' => 'info',
|
||||||
|
|
Loading…
Reference in a new issue