r36200 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r36199‎ | r36200 | r36201 >
Date:21:02, 11 June 2008
Author:ialex
Status:old
Tags:
Comment:
Like UsernameBlacklist, remove useless extension function
Modified paths:
  • /trunk/extensions/TitleBlacklist/TitleBlacklist.php (modified) (history)

Diff [purge]

Index: trunk/extensions/TitleBlacklist/TitleBlacklist.php
@@ -16,8 +16,6 @@
1717 $wgAutoloadClasses['TitleBlacklist'] = dirname( __FILE__ ) . '/TitleBlacklist.list.php';
1818 $wgAutoloadClasses['TitleBlacklistHooks'] = dirname( __FILE__ ) . '/TitleBlacklist.hooks.php';
1919
20 -$wgExtensionFunctions[] = 'efSetupTitleBlacklistHooks';
21 -
2220 // Sources of TitleBlacklist
2321 define( 'TBLSRC_MSG', 0 ); // For internal usage
2422 define( 'TBLSRC_LOCALPAGE', 1 ); // Local wiki page
@@ -34,16 +32,13 @@
3533 $wgAvailableRights[] = 'tboverride';
3634 $wgGroupPermissions['sysop']['tboverride'] = true;
3735
 36+$wgHooks['getUserPermissionsErrorsExpensive'][] = 'TitleBlacklistHooks::userCan';
 37+$wgHooks['AbortMove'][] = 'TitleBlacklistHooks::abortMove';
 38+$wgHooks['EditFilter'][] = 'TitleBlacklistHooks::validateBlacklist';
 39+$wgHooks['ArticleSaveComplete'][] = 'TitleBlacklistHooks::clearBlacklist';
 40+
3841 function efInitTitleBlacklist() {
3942 global $wgTitleBlacklist;
4043 if( isset( $wgTitleBlacklist ) && $wgTitleBlacklist ) return;
4144 $wgTitleBlacklist = new TitleBlacklist();
4245 }
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 -}

Status & tagging log