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:
Chad Horohoe 2010-05-27 15:56:53 +00:00
parent 69251815ff
commit 85c4e63e2a

View file

@ -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() ),