mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/AbuseFilter.git
synced 2024-11-27 23:40:19 +00:00
Remove _age variables from cache keys
As we do for user_age, since these will always change. Also, rework the method to avoid repetition of unset(). Change-Id: Ie5ceedd89cae3813bacf6680d588bc925362c2c2
This commit is contained in:
parent
937252a74c
commit
934399de45
|
@ -1270,10 +1270,17 @@ class AbuseFilter {
|
|||
) {
|
||||
$inputVars = $vars->exportNonLazyVars();
|
||||
// Exclude noisy fields that have superficial changes
|
||||
unset( $inputVars['old_html'] );
|
||||
unset( $inputVars['new_html'] );
|
||||
unset( $inputVars['user_age'] );
|
||||
unset( $inputVars['timestamp'] );
|
||||
$excludedVars = [
|
||||
'old_html' => true,
|
||||
'new_html' => true,
|
||||
'user_age' => true,
|
||||
'timestamp' => true,
|
||||
'page_age' => true,
|
||||
'moved_from_age' => true,
|
||||
'moved_to_age' => true
|
||||
];
|
||||
|
||||
$inputVars = array_diff_key( $inputVars, $excludedVars );
|
||||
ksort( $inputVars );
|
||||
$hash = md5( serialize( $inputVars ) );
|
||||
|
||||
|
|
Loading…
Reference in a new issue