Index: trunk/extensions/Newuserlog/Newuserlog.php |
— | — | @@ -42,10 +42,13 @@ |
43 | 43 | ); |
44 | 44 | |
45 | 45 | # Add a new log type |
46 | | - $wgHooks['LogPageValidTypes'][] = 'wfNewuserlogAddLogType'; |
47 | | - $wgHooks['LogPageLogName'][] = 'wfNewuserlogAddLogName'; |
48 | | - $wgHooks['LogPageLogHeader'][] = 'wfNewuserlogAddLogHeader'; |
49 | | - $wgHooks['LogPageActionText'][] = 'wfNewuserlogAddActionText'; |
| 46 | + global $wgLogTypes, $wgLogNames, $wgLogHeaders, $wgLogActions; |
| 47 | + $wgLogTypes[] = 'newusers'; |
| 48 | + $wgLogNames['newusers'] = 'newuserlogpage'; |
| 49 | + $wgLogHeaders['newusers'] = 'newuserlogpagetext'; |
| 50 | + $wgLogActions['newusers/newusers'] = 'newuserlogentry'; |
| 51 | + $wgLogActions['newusers/create'] = 'newuserlog-create-entry'; |
| 52 | + $wgLogActions['newusers/create2'] = 'newuserlog-create2-entry'; |
50 | 53 | |
51 | 54 | # Run this hook on new account creation |
52 | 55 | $wgHooks['AddNewAccount'][] = 'wfNewuserlogHook'; |
— | — | @@ -76,27 +79,4 @@ |
77 | 80 | |
78 | 81 | return true; |
79 | 82 | } |
80 | | - |
81 | | -function wfNewuserlogAddLogType( &$types ) { |
82 | | - if ( !in_array( 'newusers', $types ) ) |
83 | | - $types[] = 'newusers'; |
84 | | - return true; |
85 | | -} |
86 | | - |
87 | | -function wfNewuserlogAddLogName( &$names ) { |
88 | | - $names['newusers'] = 'newuserlogpage'; |
89 | | - return true; |
90 | | -} |
91 | | - |
92 | | -function wfNewuserlogAddLogHeader( &$headers ) { |
93 | | - $headers['newusers'] = 'newuserlogpagetext'; |
94 | | - return true; |
95 | | -} |
96 | | - |
97 | | -function wfNewuserlogAddActionText( &$actions ) { |
98 | | - $actions['newusers/newusers'] = 'newuserlogentry'; |
99 | | - $actions['newusers/create'] = 'newuserlog-create-entry'; |
100 | | - $actions['newusers/create2'] = 'newuserlog-create2-entry'; |
101 | | - return true; |
102 | | -} |
103 | 83 | ?> |