Index: trunk/extensions/CheckUser/CheckUser.php |
— | — | @@ -1,4 +1,4 @@ |
2 | | -<?php |
| 2 | +<?PHP |
3 | 3 | |
4 | 4 | # Not a valid entry point, skip unless MEDIAWIKI is defined |
5 | 5 | if (!defined('MEDIAWIKI')) { |
— | — | @@ -34,6 +34,7 @@ |
35 | 35 | $wgHooks['RecentChange_save'][] = 'efUpdateCheckUserData'; |
36 | 36 | $wgHooks['ParserTestTables'][] = 'efCheckUserParserTestTables'; |
37 | 37 | $wgHooks['LoadExtensionSchemaUpdates'][] = 'efCheckUserSchemaUpdates'; |
| 38 | +$wgHooks['ContributionsToolLinks'][] = 'wfLoadContribsLink'; |
38 | 39 | |
39 | 40 | /** |
40 | 41 | * Hook function for RecentChange_save |
— | — | @@ -215,3 +216,16 @@ |
216 | 217 | $wgSpecialPages['CheckUser'] = 'CheckUser'; |
217 | 218 | $wgSpecialPageGroups['CheckUser'] = 'users'; |
218 | 219 | $wgAutoloadClasses['CheckUser'] = dirname(__FILE__) . '/CheckUser_body.php'; |
| 220 | + |
| 221 | + |
| 222 | +function wfLoadContribsLink( $id, $nt, &$links ) { |
| 223 | + global $wgUser; |
| 224 | + if( $wgUser->isAllowed( 'checkuser' ) ) { |
| 225 | + wfLoadExtensionMessages( 'CheckUser' ); |
| 226 | + $links[] = $wgUser->getSkin()->makeKnownLinkObj( |
| 227 | + SpecialPage::getTitleFor( 'CheckUser' ), |
| 228 | + wfMsgHtml( 'checkuser' ),'user='.$nt->getDbKey() |
| 229 | + ); |
| 230 | + } |
| 231 | + return true; |
| 232 | +} |