Index: trunk/extensions/TitleBlacklist/TitleBlacklist.php |
— | — | @@ -36,7 +36,6 @@ |
37 | 37 | function efInitTitleBlacklist() { |
38 | 38 | global $wgTitleBlacklist; |
39 | 39 | $wgTitleBlacklist = new TitleBlacklist(); |
40 | | - wfLoadExtensionMessages( 'TitleBlacklist' ); |
41 | 40 | efSetupTitleBlacklistHooks(); |
42 | 41 | } |
43 | 42 | |
Index: trunk/extensions/TitleBlacklist/TitleBlacklist.hooks.php |
— | — | @@ -12,6 +12,7 @@ |
13 | 13 | |
14 | 14 | class TitleBlacklistHooks { |
15 | 15 | public static function userCan( $title, $user, $action, &$result ) { |
| 16 | + wfLoadExtensionMessages( 'TitleBlacklist' ); |
16 | 17 | global $wgTitleBlacklist; |
17 | 18 | if( $action == 'create' || $action == 'edit' ) { |
18 | 19 | $blacklisted = $wgTitleBlacklist->isBlacklisted( $title, $action ); |
— | — | @@ -29,6 +30,7 @@ |
30 | 31 | } |
31 | 32 | |
32 | 33 | public static function abortMove( $old, $nt, $user, &$err ) { |
| 34 | + wfLoadExtensionMessages( 'TitleBlacklist' ); |
33 | 35 | global $wgTitleBlacklist; |
34 | 36 | $blacklisted = $wgTitleBlacklist->isBlacklisted( $nt, 'move' ); |
35 | 37 | if( !$blacklisted ) |
— | — | @@ -47,6 +49,7 @@ |
48 | 50 | } |
49 | 51 | |
50 | 52 | public static function verifyUpload( $fname, $fpath, &$err ) { |
| 53 | + wfLoadExtensionMessages( 'TitleBlacklist' ); |
51 | 54 | global $wgTitleBlacklist, $wgUser; |
52 | 55 | $blacklisted = $wgTitleBlacklist->isBlacklisted( Title::newFromText( $fname, NS_IMAGE ), 'upload' ); |
53 | 56 | if( $blacklisted instanceof TitleBlacklistEntry ) { |
— | — | @@ -65,6 +68,7 @@ |
66 | 69 | if( $title->getNamespace() != NS_MEDIAWIKI || $title->getDbKey() != 'Titleblacklist' ) |
67 | 70 | return true; |
68 | 71 | |
| 72 | + wfLoadExtensionMessages( 'TitleBlacklist' ); |
69 | 73 | $bl = $wgTitleBlacklist->parseBlacklist( $text ); |
70 | 74 | $ok = $wgTitleBlacklist->validate( $bl ); |
71 | 75 | if( count( $ok ) == 0 ) { |