Index: trunk/extensions/AbuseFilter/SpecialAbuseLog.php |
— | — | @@ -76,9 +76,9 @@ |
77 | 77 | // Generate conditions list. |
78 | 78 | $conds = array(); |
79 | 79 | |
80 | | - if ($this->mSearchUser) |
| 80 | + if (!empty($this->mSearchUser)) |
81 | 81 | $conds['afl_user_text'] = $this->mSearchUser; |
82 | | - if ($this->mSearchFilter) |
| 82 | + if (!empty($this->mSearchFilter)) |
83 | 83 | $conds['afl_filter'] = $this->mSearchFilter; |
84 | 84 | |
85 | 85 | $searchTitle = Title::newFromText( $this->mSearchTitle ); |
Index: trunk/extensions/AbuseFilter/AbuseFilter.php |
— | — | @@ -43,6 +43,7 @@ |
44 | 44 | $wgHooks['AbortNewAccount'][] = 'AbuseFilterHooks::onAbortNewAccount'; |
45 | 45 | $wgHooks['ArticleDelete'][] = 'AbuseFilterHooks::onArticleDelete'; |
46 | 46 | $wgHooks['LoadExtensionSchemaUpdates'][] = 'AbuseFilterHooks::onSchemaUpdate'; |
| 47 | +$wgHooks['AbortDeleteQueueNominate'][] = 'AbuseFilterHooks::onAbortDeleteQueueNominate'; |
47 | 48 | |
48 | 49 | $wgAvailableRights[] = 'abusefilter-modify'; |
49 | 50 | $wgAvailableRights[] = 'abusefilter-log-detail'; |
Index: trunk/extensions/AbuseFilter/AbuseFilter.class.php |
— | — | @@ -318,7 +318,7 @@ |
319 | 319 | $logParams[] = 'nocreate, angry-autoblock'; |
320 | 320 | |
321 | 321 | $log = new LogPage( 'block' ); |
322 | | - $log->addEntry( 'block', SpecialPage::getTitleFor( 'Contributions', $range ), |
| 322 | + $log->addEntry( 'block', Title::makeTitle( NS_USER, $range ), |
323 | 323 | wfMsgForContent( 'abusefilter-blockreason', $rule_desc ), $logParams, self::getFilterUser() ); |
324 | 324 | |
325 | 325 | $display .= wfMsgNoTrans( 'abusefilter-blocked-display', $rule_desc ) ."<br />\n"; |
Index: trunk/extensions/AbuseFilter/AbuseFilter.hooks.php |
— | — | @@ -120,4 +120,18 @@ |
121 | 121 | |
122 | 122 | return true; |
123 | 123 | } |
| 124 | + |
| 125 | + public static function onAbortDeleteQueueNominate( $user, $article, $queue, $reason, &$error ) { |
| 126 | + $vars = array(); |
| 127 | + |
| 128 | + $vars = array_merge( $vars, AbuseFilter::generateUserVars( $user ), AbuseFilter::generateTitleVars( $article->mTitle, 'ARTICLE' ) ); |
| 129 | + $vars['SUMMARY'] = $reason; |
| 130 | + $vars['ACTION'] = 'delnom'; |
| 131 | + $vars['QUEUE'] = $queue; |
| 132 | + |
| 133 | + $filter_result = AbuseFilter::filterAction( $vars, $article->mTitle ); |
| 134 | + $error = $filter_result; |
| 135 | + |
| 136 | + return $filter_result == '' || $filter_result === true; |
| 137 | + } |
124 | 138 | } |