r34301 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r34300‎ | r34301 | r34302 >
Date:08:20, 6 May 2008
Author:tstarling
Status:old
Tags:
Comment:
Use standard file naming convention
Modified paths:
  • /trunk/extensions/DeletedContributions/DeletedContributions.php (added) (history)
  • /trunk/extensions/DeletedContributions/DeletedContributions.php (added) (history)
  • /trunk/extensions/DeletedContributions/SpecialDeletedContributions.php (deleted) (history)

Diff [purge]

Index: trunk/extensions/DeletedContributions/SpecialDeletedContributions.php
@@ -1,42 +0,0 @@
2 -<?php
3 -/**
4 - @ Extension based on SpecialContributions for archived revisions
5 - @ Modifications made to SpecialContributions.php
6 - @ copyright © 2007 Aaron Schulz
7 - */
8 -
9 -$wgExtensionCredits['specialpage'][] = array(
10 - 'author' => 'Aaron Schulz',
11 - 'version' => preg_replace('/^.* (\d\d\d\d-\d\d-\d\d) .*$/', '\1', '$LastChangedDate$'), #just the date of the last change
12 - 'name' => 'Deleted user contributions',
13 - 'url' => 'http://www.mediawiki.org/wiki/Extension:DeletedContributions',
14 - 'description' => 'Gives sysops the ability to browse a user\'s deleted edits',
15 - 'descriptionmsg' => 'deletedcontributions-desc',
16 -);
17 -
18 -# Internationalisation
19 -$wgExtensionMessagesFiles['DeletedContributions'] = dirname(__FILE__) . '/DeletedContributions.i18n.php';
20 -$wgAutoloadClasses['DeletedContributionsPage']
21 - = $wgAutoloadClasses['DeletedContributionsPage']
22 - = dirname(__FILE__) . '/DeletedContributions_body.php';
23 -
24 -$wgHooks['ContributionsToolLinks'][] = 'wfLoadContribsLink';
25 -$wgSpecialPages['DeletedContributions'] = 'DeletedContributionsPage';
26 -$wgSpecialPageGroups['DeletedContributions'] = 'users';
27 -
28 -/**
29 - * Add a "Deleted contributions" link to Special:Contributions for sysops.
30 - */
31 -function wfLoadContribsLink( $id, $nt, &$links ) {
32 - global $wgUser;
33 - if( $wgUser->isAllowed( 'deletedhistory' ) ) {
34 - wfLoadExtensionMessages( 'DeletedContributions' );
35 -
36 - $links[] = $wgUser->getSkin()->makeKnownLinkObj(
37 - SpecialPage::getTitleFor( 'DeletedContributions', $nt->getDBkey() ),
38 - wfMsgHtml( 'deletedcontributions' )
39 - );
40 - }
41 - return true;
42 -}
43 -
Index: trunk/extensions/DeletedContributions/DeletedContributions.php
@@ -0,0 +1,42 @@
 2+<?php
 3+/**
 4+ @ Extension based on SpecialContributions for archived revisions
 5+ @ Modifications made to SpecialContributions.php
 6+ @ copyright © 2007 Aaron Schulz
 7+ */
 8+
 9+$wgExtensionCredits['specialpage'][] = array(
 10+ 'author' => 'Aaron Schulz',
 11+ 'version' => preg_replace('/^.* (\d\d\d\d-\d\d-\d\d) .*$/', '\1', '$LastChangedDate$'), #just the date of the last change
 12+ 'name' => 'Deleted user contributions',
 13+ 'url' => 'http://www.mediawiki.org/wiki/Extension:DeletedContributions',
 14+ 'description' => 'Gives sysops the ability to browse a user\'s deleted edits',
 15+ 'descriptionmsg' => 'deletedcontributions-desc',
 16+);
 17+
 18+# Internationalisation
 19+$wgExtensionMessagesFiles['DeletedContributions'] = dirname(__FILE__) . '/DeletedContributions.i18n.php';
 20+$wgAutoloadClasses['DeletedContributionsPage']
 21+ = $wgAutoloadClasses['DeletedContributionsPage']
 22+ = dirname(__FILE__) . '/DeletedContributions_body.php';
 23+
 24+$wgHooks['ContributionsToolLinks'][] = 'wfLoadContribsLink';
 25+$wgSpecialPages['DeletedContributions'] = 'DeletedContributionsPage';
 26+$wgSpecialPageGroups['DeletedContributions'] = 'users';
 27+
 28+/**
 29+ * Add a "Deleted contributions" link to Special:Contributions for sysops.
 30+ */
 31+function wfLoadContribsLink( $id, $nt, &$links ) {
 32+ global $wgUser;
 33+ if( $wgUser->isAllowed( 'deletedhistory' ) ) {
 34+ wfLoadExtensionMessages( 'DeletedContributions' );
 35+
 36+ $links[] = $wgUser->getSkin()->makeKnownLinkObj(
 37+ SpecialPage::getTitleFor( 'DeletedContributions', $nt->getDBkey() ),
 38+ wfMsgHtml( 'deletedcontributions' )
 39+ );
 40+ }
 41+ return true;
 42+}
 43+
Property changes on: trunk/extensions/DeletedContributions/DeletedContributions.php
___________________________________________________________________
Added: svn:eol-style
144 + native
Added: svn:keywords
245 + LastChangedDate

Status & tagging log