Index: trunk/extensions/ConfirmAccount/ConfirmAccount.php |
— | — | @@ -149,6 +149,8 @@ |
150 | 150 | 'remoteExtPath' => 'ConfirmAccount', |
151 | 151 | ); |
152 | 152 | |
| 153 | +// @todo FIXME: Move hook functions to a class. |
| 154 | + |
153 | 155 | function efAddRequestLoginText( &$template ) { |
154 | 156 | global $wgUser, $wgOut; |
155 | 157 | # Add a link to RequestAccount from UserLogin |
— | — | @@ -240,6 +242,8 @@ |
241 | 243 | $wgHooks['LoadExtensionSchemaUpdates'][] = 'efConfirmAccountSchemaUpdates'; |
242 | 244 | # Status header like "new messages" bar |
243 | 245 | $wgHooks['SiteNoticeAfter'][] = 'efConfirmAccountsNotice'; |
| 246 | +# Register admin pages for AdminLinks extension. |
| 247 | +$wgHooks['AdminLinks'][] = 'efConfirmAccountAdminLinks'; |
244 | 248 | |
245 | 249 | function efConfirmAccountSchemaUpdates( $updater = null ) { |
246 | 250 | $base = dirname( __FILE__ ); |
— | — | @@ -302,3 +306,18 @@ |
303 | 307 | } |
304 | 308 | return true; |
305 | 309 | } |
| 310 | + |
| 311 | +function efConfirmAccountAdminLinks( &$admin_links_tree ) { |
| 312 | + $general_section = $admin_links_tree->getSection( wfMsg( 'adminlinks_users' ) ); |
| 313 | + $extensions_row = $users_section->getRow( 'extensions' ); |
| 314 | + |
| 315 | + if ( is_null( $extensions_row ) ) { |
| 316 | + $extensions_row = new ALRow( 'extensions' ); |
| 317 | + $users_section->addRow( $extensions_row ); |
| 318 | + } |
| 319 | + |
| 320 | + $extensions_row->addItem( ALItem::newFromSpecialPage( 'ConfirmAccounts' ) ); |
| 321 | + $extensions_row->addItem( ALItem::newFromSpecialPage( 'UserCredentials' ) ); |
| 322 | + |
| 323 | + return true; |
| 324 | +} |