r34614 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r34613‎ | r34614 | r34615 >
Date:14:02, 11 May 2008
Author:ialex
Status:old
Tags:
Comment:
Kill useless extension function, simply define that variables when including the file
Modified paths:
  • /trunk/extensions/Newuserlog/Newuserlog.php (modified) (history)

Diff [purge]

Index: trunk/extensions/Newuserlog/Newuserlog.php
@@ -21,25 +21,21 @@
2222 'author' => 'Ævar Arnfjörð Bjarmason'
2323 );
2424
25 -$wgExtensionFunctions[] = 'wfNewuserlog';
2625 $wgExtensionMessagesFiles['Newuserlog'] = dirname(__FILE__) . '/Newuserlog.i18n.php';
2726
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';
4334
 35+# Run this hook on new account creation
 36+$wgHooks['AddNewAccount'][] = 'wfNewuserlogHook';
 37+# Run this hook on Special:Log
 38+$wgHooks['LogLine'][] = 'wfNewuserlogLogLine';
 39+
4440 function wfNewuserlogHook( $user = null, $byEmail = false ) {
4541 global $wgUser, $wgContLang, $wgVersion;
4642 wfLoadExtensionMessages( 'Newuserlog' );

Status & tagging log