Index: trunk/extensions/HoneypotIntegration/HoneypotIntegration.php |
— | — | @@ -28,8 +28,9 @@ |
29 | 29 | #$wgHooks['AbuseFilter-filterAction'][] = 'HoneypotIntegration::onAbuseFilterFilterAction'; |
30 | 30 | #$wgHooks['AbuseFilter-builder'][] = 'HoneypotIntegration::onAbuseFilterBuilder'; |
31 | 31 | $wgHooks['EditPage::showEditForm:fields'][] = 'HoneypotIntegration::onShowEditForm'; |
32 | | -$wgHooks['GetUserPermissionsErrorsExpensive'][] = |
33 | | - 'HoneypotIntegration::onGetUserPermissionsErrorsExpensive'; |
| 32 | +// $wgHooks['GetUserPermissionsErrorsExpensive'][] = |
| 33 | +// 'HoneypotIntegration::onGetUserPermissionsErrorsExpensive'; |
| 34 | +$wgHooks['RecentChange_save'][] = 'HoneypotIntegration::onRecentChangeSave'; |
34 | 35 | |
35 | 36 | $wgHoneypotURLSource = ''; |
36 | 37 | |
Index: trunk/extensions/HoneypotIntegration/HoneypotIntegration.class.php |
— | — | @@ -209,4 +209,19 @@ |
210 | 210 | } |
211 | 211 | return true; |
212 | 212 | } |
| 213 | + |
| 214 | + public static function onRecentChangeSave( $rc ) { |
| 215 | + $ip = wfGetIP(); |
| 216 | + if ( self::isIPListed( $ip ) ) { |
| 217 | + $user = $rc->getAttribute( 'rc_user_text' ); |
| 218 | + $revid = $rc->getAttribute( 'rc_this_oldid' ); |
| 219 | + $logid = $rc->getAttribute( 'rc_logid' ); |
| 220 | + $rcid = $rc->getAttribute( 'rc_id' ); |
| 221 | + |
| 222 | + wfDebugLog( 'HoneypotHit', "$ip is listed in honeypot data. ". |
| 223 | + "$user made RCID $rcid REVID $revid LOGID $logid." ); |
| 224 | + } |
| 225 | + |
| 226 | + return true; |
| 227 | + } |
213 | 228 | } |