mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/AbuseFilter.git
synced 2024-11-23 21:53:35 +00:00
Handle case where no filters were matched
This commit is contained in:
parent
1c69a9c569
commit
08890163af
|
@ -48,9 +48,9 @@ class AbuseFilterHooks {
|
|||
|
||||
$filter_result = AbuseFilter::filterAction( $vars, $oldTitle );
|
||||
|
||||
$error = "BLAH\n$filter_result";
|
||||
$error = $filter_result;
|
||||
|
||||
return $filter_result == '';
|
||||
return $filter_result == '' || $filter_result == true;
|
||||
}
|
||||
|
||||
function onArticleDelete( &$article, &$user, &$reason, &$error ) {
|
||||
|
@ -64,9 +64,9 @@ class AbuseFilterHooks {
|
|||
|
||||
$filter_result = AbuseFilter::filterAction( $vars, $article->mTitle );
|
||||
|
||||
$error = "BLAH\n$filter_result";
|
||||
$error = $filter_result;
|
||||
|
||||
return $filter_result == '';
|
||||
return $filter_result == '' || $filter_result == true;
|
||||
}
|
||||
|
||||
function onAbortNewAccount( $username, &$message ) {
|
||||
|
@ -77,8 +77,8 @@ class AbuseFilterHooks {
|
|||
|
||||
$filter_result = AbuseFilter::filterAction( $vars, SpecialPage::getTitleFor( 'Userlogin' ) );
|
||||
|
||||
$error = "BLAH\n$filter_result";
|
||||
$message = $filter_result;
|
||||
|
||||
return $filter_result == '';
|
||||
return $filter_result == '' || $filter_result == true;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue