Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit057e9d7

Browse files
authored
Merge pull request#28 from mohe2015/updates
Implement links in settings to linked accounts and to link new accounts
2 parents98cb69a +d4a09a5 commit057e9d7

File tree

11 files changed

+37
-4620
lines changed

11 files changed

+37
-4620
lines changed

‎.eslintrc.json‎

Lines changed: 0 additions & 8 deletions
This file was deleted.

‎Gruntfile.js‎

Lines changed: 0 additions & 29 deletions
This file was deleted.

‎composer.json‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@
66
"require-dev": {
77
"mediawiki/mediawiki-codesniffer":"38.0.0",
88
"mediawiki/minus-x":"1.1.1",
9-
"php-parallel-lint/php-console-highlighter":"0.5.0",
10-
"php-parallel-lint/php-parallel-lint":"1.3.1"
9+
"php-parallel-lint/php-console-highlighter":"1.0.0",
10+
"php-parallel-lint/php-parallel-lint":"1.3.2"
1111
},
1212
"scripts": {
1313
"test": [

‎extension.json‎

Lines changed: 2 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -30,25 +30,14 @@
3030
},
3131
"Hooks": {
3232
"LoadExtensionSchemaUpdates":"AuthManagerOAuthHooks",
33-
"AuthChangeFormFields":"AuthManagerOAuthHooks"
33+
"AuthChangeFormFields":"AuthManagerOAuthHooks",
34+
"GetPreferences":"AuthManagerOAuthHooks"
3435
},
3536
"MessagesDirs": {
3637
"AuthManagerOAuth": [
3738
"i18n"
3839
]
3940
},
40-
"ResourceFileModulePaths": {
41-
"localBasePath":"resources",
42-
"remoteExtPath":"AuthManagerOAuth/resources"
43-
},
44-
"ResourceModules": {
45-
"ext.authManagerOAuth": {
46-
"dependencies": [],
47-
"messages": [],
48-
"styles": [],
49-
"scripts": []
50-
}
51-
},
5241
"AuthManagerAutoConfig": {
5342
"primaryauth": {
5443
"MediaWiki\\Extension\\AuthManagerOAuth\\AuthManagerOAuthPrimaryAuthenticationProvider": {

‎i18n/en.json‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,5 +16,7 @@
1616
"authmanageroauth-state-mismatch":"Mismatched authentication state - This looks like an attack",
1717
"authmanageroauth-error":"Error: $1",
1818
"authmanageroauth-account-already-exists":"Account already exists.",
19-
"authmanageroauth-choose-username":"Choose a username"
19+
"authmanageroauth-choose-username":"Choose a username",
20+
"authmanageroauth-linked-accounts":"Linked accounts",
21+
"authmanageroauth-link-accounts":"Link accounts"
2022
}

‎i18n/qqq.json‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,5 +16,7 @@
1616
"authmanageroauth-state-mismatch":"Mismatched authentication state - This looks like an attack",
1717
"authmanageroauth-error":"A generic OAuth error with $1 for the message.",
1818
"authmanageroauth-account-already-exists":"Account already exists.",
19-
"authmanageroauth-choose-username":"Choose a username"
19+
"authmanageroauth-choose-username":"Choose a username",
20+
"authmanageroauth-linked-accounts":"Linked accounts",
21+
"authmanageroauth-link-accounts":"Link accounts"
2022
}

‎includes/Hooks.php‎

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,4 +50,31 @@ public static function onAuthChangeFormFields( $requests, $fieldInfo, &$formDesc
5050
}
5151
}
5252
}
53+
54+
/**
55+
* Add buttons to linked accounts and to link new accounts
56+
* @inheritDoc
57+
*/
58+
publicstaticfunctiononGetPreferences(\User$user,array &$preferences ) {
59+
$preferences['authmanageroauth-linked-accounts-link'] = [
60+
'section' =>'personal/info',
61+
'label-message' =>'authmanageroauth-linked-accounts',
62+
'type' =>'info',
63+
'raw' =>true,
64+
'default' => (string)(new \OOUI\ButtonWidget( [
65+
'href' => \SpecialPage::getTitleFor('ChangeCredentials' )->getLinkURL(),
66+
'label' =>wfMessage('authmanageroauth-linked-accounts' )->plain()
67+
] ) )
68+
];
69+
$preferences['authmanageroauth-link-accounts-link'] = [
70+
'section' =>'personal/info',
71+
'label-message' =>'authmanageroauth-link-accounts',
72+
'type' =>'info',
73+
'raw' =>true,
74+
'default' => (string)(new \OOUI\ButtonWidget( [
75+
'href' => \SpecialPage::getTitleFor('LinkAccounts' )->getLinkURL(),
76+
'label' =>wfMessage('authmanageroauth-link-accounts' )->plain()
77+
] ) )
78+
];
79+
}
5380
}

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp