r70933 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r70932‎ | r70933 | r70934 >
Date:09:33, 12 August 2010
Author:catrope
Status:deferred
Tags:
Comment:
1.16wmf4: Functional merge of r70390, r70392 (real merge causes a mess because r70930 contains formatting changes and there are preceding revs)
Modified paths:
  • /branches/wmf/1.16wmf4/extensions/TitleBlacklist/TitleBlacklist.hooks.php (modified) (history)

Diff [purge]

Index: branches/wmf/1.16wmf4/extensions/TitleBlacklist/TitleBlacklist.hooks.php
@@ -54,13 +54,13 @@
5555 }
5656
5757 /** AbortNewAccount hook */
58 - public static function abortNewAccount($user, &$message) {
 58+ public static function abortNewAccount($user, &$err) {
5959 global $wgTitleBlacklist, $wgUser;
6060 if ( $wgUser->isAllowed( 'tboverride' ) )
6161 return true;
6262
6363 efInitTitleBlacklist();
64 - $title = Title::newFromText( $user->getName() );
 64+ $title = Title::makeTitleSafe( NS_USER, $user->getName() );
6565 $blacklisted = $wgTitleBlacklist->isBlacklisted( $title, 'new-account' );
6666 if( !( $blacklisted instanceof TitleBlacklistEntry ) )
6767 $blacklisted = $wgTitleBlacklist->isBlacklisted( $title, 'create' );
@@ -68,12 +68,8 @@
6969 wfLoadExtensionMessages( 'TitleBlacklist' );
7070 $message = $blacklisted->getCustomMessage();
7171 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() );
7874 return false;
7975 }
8076 return true;

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r70390Moved server location out of ResourceLoader and into load.php. Now whatever m...tparscal17:33, 3 August 2010
r70392When marking page for translation, purge the completion percentages....nikerabbit17:56, 3 August 2010
r70930TitleBlacklist extension fixes:...mgrabovsky08:38, 12 August 2010

Status & tagging log