Index: trunk/extensions/DeletedContributions/SpecialDeletedContributions.php |
— | — | @@ -2,7 +2,7 @@ |
3 | 3 | /** |
4 | 4 | @ Extension based on SpecialContributions for arhived revisions |
5 | 5 | @ Modifications made to SpecialContributions.php |
6 | | - @ copyright � 2007 Aaron Schulz |
| 6 | + @ copyright 2007 Aaron Schulz |
7 | 7 | */ |
8 | 8 | |
9 | 9 | $wgExtensionCredits['specialpage'][] = array( |
— | — | @@ -16,21 +16,20 @@ |
17 | 17 | $wgExtensionFunctions[] = 'efLoadDeletedContribsMessages'; |
18 | 18 | |
19 | 19 | global $wgHooks; |
20 | | -$wgHooks['SpecialContribsSubEnd'][] = 'wfLoadContribsLink'; |
| 20 | +$wgHooks['ContributionsToolLinks'][] = 'wfLoadContribsLink'; |
21 | 21 | |
22 | 22 | /** |
23 | 23 | * Add a "Deleted contributions" link to Special:Contributions for sysops. |
24 | 24 | */ |
25 | | -function wfLoadContribsLink( $nt, &$links ) { |
| 25 | +function wfLoadContribsLink( $id, $nt, &$links ) { |
26 | 26 | global $wgUser; |
27 | | - |
28 | | - # Only sysops (or those who can see deleted contribs) need the link. |
29 | | - if ( !$wgUser->isAllowed( 'deletedhistory' ) ) return true; |
30 | | - |
31 | | - $sk = $wgUser->getSkin(); |
32 | | - |
33 | | - $links[] = $sk->makeKnownLinkObj( SpecialPage::getTitleFor( 'DeletedContributions'), |
34 | | - wfMsg('deletedcontributions'), 'target=' . $nt->getPartialURL() ); |
| 27 | + if( $wgUser->isAllowed( 'deletedhistory' ) ) { |
| 28 | + $links[] = $wgUser->getSkin()->makeKnownLinkObj( |
| 29 | + SpecialPage::getTitleFor( 'DeletedContributions' ), |
| 30 | + wfMsgHtml( 'deletedcontributions' ), |
| 31 | + 'target=' . $nt->getPartialUrl() |
| 32 | + ); |
| 33 | + } |
35 | 34 | return true; |
36 | 35 | } |
37 | 36 | |