mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/TitleBlacklist
synced 2024-11-15 10:17:49 +00:00
(bug 41242) Parse the unacceptable new account name/move messages
Caused by Ie78fa258 Also fix blacklist validation message and add a missing whitespace Change-Id: I8be6bded76a048cba1d8770f795ef240b7b02951
This commit is contained in:
parent
a72fa12bb1
commit
12184972ae
|
@ -60,7 +60,7 @@ class TitleBlacklistHooks {
|
||||||
$err = wfMessage( $blacklisted->getErrorMessage( 'move' ),
|
$err = wfMessage( $blacklisted->getErrorMessage( 'move' ),
|
||||||
$blacklisted->getRaw(),
|
$blacklisted->getRaw(),
|
||||||
$old->getFullText(),
|
$old->getFullText(),
|
||||||
$nt->getFullText() )->escaped();
|
$nt->getFullText() )->parse();
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
|
@ -80,7 +80,7 @@ class TitleBlacklistHooks {
|
||||||
'new-account', $override );
|
'new-account', $override );
|
||||||
if ( $blacklisted instanceof TitleBlacklistEntry ) {
|
if ( $blacklisted instanceof TitleBlacklistEntry ) {
|
||||||
$message = $blacklisted->getErrorMessage( 'new-account' );
|
$message = $blacklisted->getErrorMessage( 'new-account' );
|
||||||
$err = wfMessage( $message, $blacklisted->getRaw(), $userName )->escaped();
|
$err = wfMessage( $message, $blacklisted->getRaw(), $userName )->parse();
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
|
@ -109,7 +109,7 @@ class TitleBlacklistHooks {
|
||||||
*
|
*
|
||||||
* @param $editor EditPage
|
* @param $editor EditPage
|
||||||
*/
|
*/
|
||||||
public static function validateBlacklist( $editor, $text, $section, $error ) {
|
public static function validateBlacklist( $editor, $text, $section, &$error ) {
|
||||||
global $wgUser;
|
global $wgUser;
|
||||||
$title = $editor->mTitle;
|
$title = $editor->mTitle;
|
||||||
|
|
||||||
|
@ -122,7 +122,7 @@ class TitleBlacklistHooks {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
$errmsg = wfMessage( 'titleblacklist-invalid')->numParams( count( $ok ) )->text();
|
$errmsg = wfMessage( 'titleblacklist-invalid' )->numParams( count( $ok ) )->text();
|
||||||
$errlines = '* <code>' . implode( "</code>\n* <code>", array_map( 'wfEscapeWikiText', $ok ) ) . '</code>';
|
$errlines = '* <code>' . implode( "</code>\n* <code>", array_map( 'wfEscapeWikiText', $ok ) ) . '</code>';
|
||||||
$error = Html::openElement( 'div', array( 'class' => 'errorbox' ) ) .
|
$error = Html::openElement( 'div', array( 'class' => 'errorbox' ) ) .
|
||||||
$errmsg .
|
$errmsg .
|
||||||
|
|
Loading…
Reference in a new issue