mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/AbuseFilter.git
synced 2024-11-12 00:38:23 +00:00
Large commit. Removed 800+ references to no-op wfLoadExtensionMessages()
This commit is contained in:
parent
88d46cbbea
commit
3283b90f01
|
@ -193,8 +193,6 @@ class AbuseFilter {
|
|||
}
|
||||
|
||||
public static function ajaxCheckSyntax( $filter ) {
|
||||
wfLoadExtensionMessages( 'AbuseFilter' );
|
||||
|
||||
global $wgUser;
|
||||
if ( !$wgUser->isAllowed( 'abusefilter-modify' ) ) {
|
||||
return false;
|
||||
|
@ -313,7 +311,6 @@ class AbuseFilter {
|
|||
}
|
||||
|
||||
public static function evaluateExpression( $expr, $vars = array() ) {
|
||||
wfLoadExtensionMessages( 'AbuseFilter' );
|
||||
global $wgAbuseFilterParserClass;
|
||||
|
||||
if ( self::checkSyntax( $expr ) !== true ) {
|
||||
|
@ -329,7 +326,6 @@ class AbuseFilter {
|
|||
|
||||
public static function ajaxReAutoconfirm( $username ) {
|
||||
global $wgUser;
|
||||
wfLoadExtensionMessages( 'AbuseFilter' );
|
||||
|
||||
if ( !$wgUser->isAllowed( 'abusefilter-modify' ) ) {
|
||||
// Don't allow it.
|
||||
|
@ -612,8 +608,6 @@ class AbuseFilter {
|
|||
$actionsByFilter = self::getConsequencesForFilters( $filters );
|
||||
$actionsTaken = array_fill_keys( $filters, array() );
|
||||
|
||||
wfLoadExtensionMessages( 'AbuseFilter' );
|
||||
|
||||
$messages = array();
|
||||
|
||||
foreach ( $actionsByFilter as $filter => $actions ) {
|
||||
|
@ -958,7 +952,6 @@ class AbuseFilter {
|
|||
public static function takeConsequenceAction( $action, $parameters, $title,
|
||||
$vars, $rule_desc )
|
||||
{
|
||||
wfLoadExtensionMessages( 'AbuseFilter' );
|
||||
$display = '';
|
||||
switch ( $action ) {
|
||||
case 'disallow':
|
||||
|
@ -1286,8 +1279,6 @@ class AbuseFilter {
|
|||
}
|
||||
|
||||
public static function getFilterUser() {
|
||||
wfLoadExtensionMessages( 'AbuseFilter' );
|
||||
|
||||
$user = User::newFromName( wfMsgForContent( 'abusefilter-blocker' ) );
|
||||
$user->load();
|
||||
if ( $user->getId() && $user->mPassword == '' ) {
|
||||
|
|
|
@ -99,7 +99,6 @@ class AbuseFilterHooks {
|
|||
}
|
||||
|
||||
public static function onAbortNewAccount( $user, &$message ) {
|
||||
wfLoadExtensionMessages( 'AbuseFilter' );
|
||||
if ( $user->getName() == wfMsgForContent( 'abusefilter-blocker' ) ) {
|
||||
$message = wfMsg( 'abusefilter-accountreserved' );
|
||||
return false;
|
||||
|
@ -198,7 +197,6 @@ class AbuseFilterHooks {
|
|||
|
||||
public static function onContributionsToolLinks( $id, $nt, &$tools ) {
|
||||
global $wgUser;
|
||||
wfLoadExtensionMessages( 'AbuseFilter' );
|
||||
if ( $wgUser->isAllowed( 'abusefilter-log' ) ) {
|
||||
$sk = $wgUser->getSkin();
|
||||
$tools[] = $sk->link(
|
||||
|
|
|
@ -1641,7 +1641,6 @@ class AbuseFilterParser {
|
|||
|
||||
public static function regexErrorHandler( $errno, $errstr, $errfile, $errline, $context ) {
|
||||
if ( error_reporting() == 0 ) { return true; }
|
||||
wfLoadExtensionMessages( 'AbuseFilter' );
|
||||
throw new AFPUserVisibleException( 'regexfailure', $context['pos'],
|
||||
array( $errstr, $context['regex'] ) );
|
||||
return true;
|
||||
|
|
|
@ -6,7 +6,6 @@ class SpecialAbuseFilter extends SpecialPage {
|
|||
var $mSkin;
|
||||
|
||||
public function __construct() {
|
||||
wfLoadExtensionMessages( 'AbuseFilter' );
|
||||
parent::__construct( 'AbuseFilter', 'abusefilter-view' );
|
||||
}
|
||||
|
||||
|
|
|
@ -4,7 +4,6 @@ if ( !defined( 'MEDIAWIKI' ) )
|
|||
|
||||
class SpecialAbuseLog extends SpecialPage {
|
||||
public function __construct() {
|
||||
wfLoadExtensionMessages( 'AbuseFilter' );
|
||||
parent::__construct( 'AbuseLog', 'abusefilter-log' );
|
||||
}
|
||||
|
||||
|
|
|
@ -14,7 +14,6 @@ if ( $wgDBtype == 'postgres' )
|
|||
dbsource( dirname( __FILE__ ) . $sqlfile );
|
||||
|
||||
// Create the Abuse Filter user.
|
||||
wfLoadExtensionMessages( 'AbuseFilter' );
|
||||
$user = User::newFromName( wfMsgForContent( 'abusefilter-blocker' ) );
|
||||
|
||||
if ( !$user->getId() ) {
|
||||
|
|
|
@ -9,8 +9,6 @@ require_once ( getenv( 'MW_INSTALL_PATH' ) !== false
|
|||
|
||||
$tester = new AbuseFilterParser;
|
||||
|
||||
wfLoadExtensionMessages( 'AbuseFilter' );
|
||||
|
||||
$test_path = dirname( __FILE__ ) . "/tests";
|
||||
$tests = glob( $test_path . "/*.t" );
|
||||
|
||||
|
|
Loading…
Reference in a new issue