Index: branches/wmf/1.16wmf4/extensions/TitleBlacklist/TitleBlacklist.hooks.php |
— | — | @@ -54,13 +54,13 @@ |
55 | 55 | } |
56 | 56 | |
57 | 57 | /** AbortNewAccount hook */ |
58 | | - public static function abortNewAccount($user, &$message) { |
| 58 | + public static function abortNewAccount($user, &$err) { |
59 | 59 | global $wgTitleBlacklist, $wgUser; |
60 | 60 | if ( $wgUser->isAllowed( 'tboverride' ) ) |
61 | 61 | return true; |
62 | 62 | |
63 | 63 | efInitTitleBlacklist(); |
64 | | - $title = Title::newFromText( $user->getName() ); |
| 64 | + $title = Title::makeTitleSafe( NS_USER, $user->getName() ); |
65 | 65 | $blacklisted = $wgTitleBlacklist->isBlacklisted( $title, 'new-account' ); |
66 | 66 | if( !( $blacklisted instanceof TitleBlacklistEntry ) ) |
67 | 67 | $blacklisted = $wgTitleBlacklist->isBlacklisted( $title, 'create' ); |
— | — | @@ -68,12 +68,8 @@ |
69 | 69 | wfLoadExtensionMessages( 'TitleBlacklist' ); |
70 | 70 | $message = $blacklisted->getCustomMessage(); |
71 | 71 | if( is_null( $message ) ) |
72 | | - $message = wfMsgWikiHtml( 'titleblacklist-forbidden-new-account', |
73 | | - $blacklisted->getRaw(), |
74 | | - $user->getName() ); |
75 | | - $result = array( $message, |
76 | | - htmlspecialchars( $blacklisted->getRaw() ), |
77 | | - $title->getFullText() ); |
| 72 | + $message = 'titleblacklist-forbidden-new-account'; |
| 73 | + $err = wfMsgWikiHtml( $message, $blacklisted->getRaw(), $user->getName() ); |
78 | 74 | return false; |
79 | 75 | } |
80 | 76 | return true; |