Handle case where no filters were matched

This commit is contained in:
Andrew Garrett 2008-06-27 08:34:34 +00:00
parent 1c69a9c569
commit 08890163af

View file

@ -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;
}
}