r90462 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r90461‎ | r90462 | r90463 >
Date:14:24, 20 June 2011
Author:siebrand
Status:resolved
Tags:
Comment:
Add admin pages in AdminLinks extension.
Remove trailing whitespace.
Add FIXME for global functions.
Modified paths:
  • /trunk/extensions/ConfirmAccount/ConfirmAccount.php (modified) (history)

Diff [purge]

Index: trunk/extensions/ConfirmAccount/ConfirmAccount.php
@@ -149,6 +149,8 @@
150150 'remoteExtPath' => 'ConfirmAccount',
151151 );
152152
 153+// @todo FIXME: Move hook functions to a class.
 154+
153155 function efAddRequestLoginText( &$template ) {
154156 global $wgUser, $wgOut;
155157 # Add a link to RequestAccount from UserLogin
@@ -240,6 +242,8 @@
241243 $wgHooks['LoadExtensionSchemaUpdates'][] = 'efConfirmAccountSchemaUpdates';
242244 # Status header like "new messages" bar
243245 $wgHooks['SiteNoticeAfter'][] = 'efConfirmAccountsNotice';
 246+# Register admin pages for AdminLinks extension.
 247+$wgHooks['AdminLinks'][] = 'efConfirmAccountAdminLinks';
244248
245249 function efConfirmAccountSchemaUpdates( $updater = null ) {
246250 $base = dirname( __FILE__ );
@@ -302,3 +306,18 @@
303307 }
304308 return true;
305309 }
 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+}

Follow-up revisions

RevisionCommit summaryAuthorDate
r90463Fix copy-paste-replace fail in r90462.siebrand14:27, 20 June 2011

Status & tagging log