File tree Expand file tree Collapse file tree 2 files changed +23
-1
lines changed Expand file tree Collapse file tree 2 files changed +23
-1
lines changed Original file line number Diff line number Diff line change 47
47
},
48
48
"AutoloadClasses" : {
49
49
"CloseAccount" : " includes/specials/SpecialCloseAccount.php" ,
50
- "EditAccount" : " includes/specials/SpecialEditAccount.php"
50
+ "EditAccount" : " includes/specials/SpecialEditAccount.php" ,
51
+ "EditAccountHooks" : " includes/Hooks.php"
52
+ },
53
+ "Hooks" : {
54
+ "AdminLinks" : " EditAccountHooks::addToAdminLinks"
51
55
},
52
56
"ResourceModules" : {
53
57
"ext.editAccount" : {
Original file line number Diff line number Diff line change
1
+ <?php
2
+
3
+ class EditAccountHooks {
4
+ /**
5
+ * Add a link to 'Special:ApprovedPages' to the page
6
+ * 'Special:AdminLinks', defined by the Admin Links extension.
7
+ */
8
+ public static function addToAdminLinks ( $ admin_links_tree ): bool {
9
+ $ general_section = $ admin_links_tree ->getSection ( wfMessage ( 'adminlinks_users ' )->text () );
10
+ $ extensions_row = $ general_section ->getRow ( 'main ' );
11
+ if ( $ extensions_row === null ) {
12
+ $ extensions_row = new ALRow ( 'main ' );
13
+ $ general_section ->addRow ( $ extensions_row );
14
+ }
15
+ $ extensions_row ->addItem ( ALItem::newFromSpecialPage ( 'EditAccount ' ), 'Userrights ' );
16
+ return true ;
17
+ }
18
+ }
You can’t perform that action at this time.
0 commit comments