Index: trunk/extensions/Newuserlog/Newuserlog.php |
— | — | @@ -21,25 +21,21 @@ |
22 | 22 | 'author' => 'Ævar Arnfjörð Bjarmason' |
23 | 23 | ); |
24 | 24 | |
25 | | -$wgExtensionFunctions[] = 'wfNewuserlog'; |
26 | 25 | $wgExtensionMessagesFiles['Newuserlog'] = dirname(__FILE__) . '/Newuserlog.i18n.php'; |
27 | 26 | |
28 | | -function wfNewuserlog() { |
29 | | - # Add a new log type |
30 | | - global $wgLogTypes, $wgLogNames, $wgLogHeaders, $wgLogActions; |
31 | | - $wgLogTypes[] = 'newusers'; |
32 | | - $wgLogNames['newusers'] = 'newuserlogpage'; |
33 | | - $wgLogHeaders['newusers'] = 'newuserlogpagetext'; |
34 | | - $wgLogActions['newusers/newusers'] = 'newuserlogentry'; |
35 | | - $wgLogActions['newusers/create'] = 'newuserlog-create-entry'; |
36 | | - $wgLogActions['newusers/create2'] = 'newuserlog-create2-entry'; |
37 | | - # Run this hook on new account creation |
38 | | - global $wgHooks; |
39 | | - $wgHooks['AddNewAccount'][] = 'wfNewuserlogHook'; |
40 | | - # Run this hook on Special:Log |
41 | | - $wgHooks['LogLine'][] = 'wfNewuserlogLogLine'; |
42 | | -} |
| 27 | +# Add a new log type |
| 28 | +$wgLogTypes[] = 'newusers'; |
| 29 | +$wgLogNames['newusers'] = 'newuserlogpage'; |
| 30 | +$wgLogHeaders['newusers'] = 'newuserlogpagetext'; |
| 31 | +$wgLogActions['newusers/newusers'] = 'newuserlogentry'; |
| 32 | +$wgLogActions['newusers/create'] = 'newuserlog-create-entry'; |
| 33 | +$wgLogActions['newusers/create2'] = 'newuserlog-create2-entry'; |
43 | 34 | |
| 35 | +# Run this hook on new account creation |
| 36 | +$wgHooks['AddNewAccount'][] = 'wfNewuserlogHook'; |
| 37 | +# Run this hook on Special:Log |
| 38 | +$wgHooks['LogLine'][] = 'wfNewuserlogLogLine'; |
| 39 | + |
44 | 40 | function wfNewuserlogHook( $user = null, $byEmail = false ) { |
45 | 41 | global $wgUser, $wgContLang, $wgVersion; |
46 | 42 | wfLoadExtensionMessages( 'Newuserlog' ); |