mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/TitleBlacklist
synced 2024-11-15 10:17:49 +00:00
Revert r66934 (Removing wfLoadExtensionMessages() from everything). I disagree on principle...we branch extensions for this very reason. But people want trunk extensions compatible for several versions back, meh.
This commit is contained in:
parent
69251815ff
commit
85c4e63e2a
|
@ -19,6 +19,7 @@ class TitleBlacklistHooks {
|
|||
efInitTitleBlacklist();
|
||||
$blacklisted = $wgTitleBlacklist->isBlacklisted( $title, $action );
|
||||
if( $blacklisted instanceof TitleBlacklistEntry ) {
|
||||
wfLoadExtensionMessages( 'TitleBlacklist' );
|
||||
$message = $blacklisted->getCustomMessage();
|
||||
if( is_null( $message ) )
|
||||
$message = 'titleblacklist-forbidden-edit';
|
||||
|
@ -39,6 +40,7 @@ class TitleBlacklistHooks {
|
|||
if( !$blacklisted )
|
||||
$blacklisted = $wgTitleBlacklist->isBlacklisted( $old, 'edit' );
|
||||
if( $blacklisted instanceof TitleBlacklistEntry ) {
|
||||
wfLoadExtensionMessages( 'TitleBlacklist' );
|
||||
$message = $blacklisted->getCustomMessage();
|
||||
if( is_null( $message ) )
|
||||
$message = 'titleblacklist-forbidden-move';
|
||||
|
@ -63,6 +65,7 @@ class TitleBlacklistHooks {
|
|||
if( !( $blacklisted instanceof TitleBlacklistEntry ) )
|
||||
$blacklisted = $wgTitleBlacklist->isBlacklisted( $title, 'create' );
|
||||
if( $blacklisted instanceof TitleBlacklistEntry ) {
|
||||
wfLoadExtensionMessages( 'TitleBlacklist' );
|
||||
$message = $blacklisted->getCustomMessage();
|
||||
if( is_null( $message ) )
|
||||
$message = wfMsgWikiHtml( 'titleblacklist-forbidden-new-account',
|
||||
|
@ -89,6 +92,7 @@ class TitleBlacklistHooks {
|
|||
return true;
|
||||
}
|
||||
|
||||
wfLoadExtensionMessages( 'TitleBlacklist' );
|
||||
$errmsg = wfMsgExt( 'titleblacklist-invalid', array( 'parsemag' ), count( $ok ) );
|
||||
$errlines = '* <tt>' . implode( "</tt>\n* <tt>", array_map( 'wfEscapeWikiText', $ok ) ) . '</tt>';
|
||||
$error = '<div class="errorbox">' .
|
||||
|
@ -106,6 +110,7 @@ class TitleBlacklistHooks {
|
|||
if ( $retitle !== null && !$retitle->exists() ) {
|
||||
$blacklisted = $wgTitleBlacklist->isBlacklisted( $retitle, 'create' );
|
||||
if ( $blacklisted instanceof TitleBlacklistEntry ) {
|
||||
wfLoadExtensionMessages( 'TitleBlacklist' );
|
||||
$error = ( '<div class="errorbox">' .
|
||||
wfMsg( 'titleblacklist-forbidden-edit',
|
||||
htmlspecialchars( $blacklisted->getRaw() ),
|
||||
|
|
Loading…
Reference in a new issue