Index: trunk/extensions/TitleBlacklist/TitleBlacklist.php |
— | — | @@ -16,8 +16,6 @@ |
17 | 17 | $wgAutoloadClasses['TitleBlacklist'] = dirname( __FILE__ ) . '/TitleBlacklist.list.php'; |
18 | 18 | $wgAutoloadClasses['TitleBlacklistHooks'] = dirname( __FILE__ ) . '/TitleBlacklist.hooks.php'; |
19 | 19 | |
20 | | -$wgExtensionFunctions[] = 'efSetupTitleBlacklistHooks'; |
21 | | - |
22 | 20 | // Sources of TitleBlacklist |
23 | 21 | define( 'TBLSRC_MSG', 0 ); // For internal usage |
24 | 22 | define( 'TBLSRC_LOCALPAGE', 1 ); // Local wiki page |
— | — | @@ -34,16 +32,13 @@ |
35 | 33 | $wgAvailableRights[] = 'tboverride'; |
36 | 34 | $wgGroupPermissions['sysop']['tboverride'] = true; |
37 | 35 | |
| 36 | +$wgHooks['getUserPermissionsErrorsExpensive'][] = 'TitleBlacklistHooks::userCan'; |
| 37 | +$wgHooks['AbortMove'][] = 'TitleBlacklistHooks::abortMove'; |
| 38 | +$wgHooks['EditFilter'][] = 'TitleBlacklistHooks::validateBlacklist'; |
| 39 | +$wgHooks['ArticleSaveComplete'][] = 'TitleBlacklistHooks::clearBlacklist'; |
| 40 | + |
38 | 41 | function efInitTitleBlacklist() { |
39 | 42 | global $wgTitleBlacklist; |
40 | 43 | if( isset( $wgTitleBlacklist ) && $wgTitleBlacklist ) return; |
41 | 44 | $wgTitleBlacklist = new TitleBlacklist(); |
42 | 45 | } |
43 | | - |
44 | | -function efSetupTitleBlacklistHooks() { |
45 | | - global $wgHooks; |
46 | | - $wgHooks['getUserPermissionsErrorsExpensive'][] = 'TitleBlacklistHooks::userCan'; |
47 | | - $wgHooks['AbortMove'][] = 'TitleBlacklistHooks::abortMove'; |
48 | | - $wgHooks['EditFilter'][] = 'TitleBlacklistHooks::validateBlacklist'; |
49 | | - $wgHooks['ArticleSaveComplete'][] = 'TitleBlacklistHooks::clearBlacklist'; |
50 | | -} |