mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/TitleBlacklist
synced 2024-11-15 18:19:45 +00:00
Large commit. Removed 800+ references to no-op wfLoadExtensionMessages()
This commit is contained in:
parent
f1c964fa2b
commit
69251815ff
|
@ -19,7 +19,6 @@ class TitleBlacklistHooks {
|
||||||
efInitTitleBlacklist();
|
efInitTitleBlacklist();
|
||||||
$blacklisted = $wgTitleBlacklist->isBlacklisted( $title, $action );
|
$blacklisted = $wgTitleBlacklist->isBlacklisted( $title, $action );
|
||||||
if( $blacklisted instanceof TitleBlacklistEntry ) {
|
if( $blacklisted instanceof TitleBlacklistEntry ) {
|
||||||
wfLoadExtensionMessages( 'TitleBlacklist' );
|
|
||||||
$message = $blacklisted->getCustomMessage();
|
$message = $blacklisted->getCustomMessage();
|
||||||
if( is_null( $message ) )
|
if( is_null( $message ) )
|
||||||
$message = 'titleblacklist-forbidden-edit';
|
$message = 'titleblacklist-forbidden-edit';
|
||||||
|
@ -40,7 +39,6 @@ class TitleBlacklistHooks {
|
||||||
if( !$blacklisted )
|
if( !$blacklisted )
|
||||||
$blacklisted = $wgTitleBlacklist->isBlacklisted( $old, 'edit' );
|
$blacklisted = $wgTitleBlacklist->isBlacklisted( $old, 'edit' );
|
||||||
if( $blacklisted instanceof TitleBlacklistEntry ) {
|
if( $blacklisted instanceof TitleBlacklistEntry ) {
|
||||||
wfLoadExtensionMessages( 'TitleBlacklist' );
|
|
||||||
$message = $blacklisted->getCustomMessage();
|
$message = $blacklisted->getCustomMessage();
|
||||||
if( is_null( $message ) )
|
if( is_null( $message ) )
|
||||||
$message = 'titleblacklist-forbidden-move';
|
$message = 'titleblacklist-forbidden-move';
|
||||||
|
@ -65,7 +63,6 @@ class TitleBlacklistHooks {
|
||||||
if( !( $blacklisted instanceof TitleBlacklistEntry ) )
|
if( !( $blacklisted instanceof TitleBlacklistEntry ) )
|
||||||
$blacklisted = $wgTitleBlacklist->isBlacklisted( $title, 'create' );
|
$blacklisted = $wgTitleBlacklist->isBlacklisted( $title, 'create' );
|
||||||
if( $blacklisted instanceof TitleBlacklistEntry ) {
|
if( $blacklisted instanceof TitleBlacklistEntry ) {
|
||||||
wfLoadExtensionMessages( 'TitleBlacklist' );
|
|
||||||
$message = $blacklisted->getCustomMessage();
|
$message = $blacklisted->getCustomMessage();
|
||||||
if( is_null( $message ) )
|
if( is_null( $message ) )
|
||||||
$message = wfMsgWikiHtml( 'titleblacklist-forbidden-new-account',
|
$message = wfMsgWikiHtml( 'titleblacklist-forbidden-new-account',
|
||||||
|
@ -92,7 +89,6 @@ class TitleBlacklistHooks {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
wfLoadExtensionMessages( 'TitleBlacklist' );
|
|
||||||
$errmsg = wfMsgExt( 'titleblacklist-invalid', array( 'parsemag' ), count( $ok ) );
|
$errmsg = wfMsgExt( 'titleblacklist-invalid', array( 'parsemag' ), count( $ok ) );
|
||||||
$errlines = '* <tt>' . implode( "</tt>\n* <tt>", array_map( 'wfEscapeWikiText', $ok ) ) . '</tt>';
|
$errlines = '* <tt>' . implode( "</tt>\n* <tt>", array_map( 'wfEscapeWikiText', $ok ) ) . '</tt>';
|
||||||
$error = '<div class="errorbox">' .
|
$error = '<div class="errorbox">' .
|
||||||
|
@ -110,7 +106,6 @@ class TitleBlacklistHooks {
|
||||||
if ( $retitle !== null && !$retitle->exists() ) {
|
if ( $retitle !== null && !$retitle->exists() ) {
|
||||||
$blacklisted = $wgTitleBlacklist->isBlacklisted( $retitle, 'create' );
|
$blacklisted = $wgTitleBlacklist->isBlacklisted( $retitle, 'create' );
|
||||||
if ( $blacklisted instanceof TitleBlacklistEntry ) {
|
if ( $blacklisted instanceof TitleBlacklistEntry ) {
|
||||||
wfLoadExtensionMessages( 'TitleBlacklist' );
|
|
||||||
$error = ( '<div class="errorbox">' .
|
$error = ( '<div class="errorbox">' .
|
||||||
wfMsg( 'titleblacklist-forbidden-edit',
|
wfMsg( 'titleblacklist-forbidden-edit',
|
||||||
htmlspecialchars( $blacklisted->getRaw() ),
|
htmlspecialchars( $blacklisted->getRaw() ),
|
||||||
|
|
Loading…
Reference in a new issue