From: Brion Vibber Date: Thu, 19 Jun 2008 23:33:45 +0000 (+0000) Subject: apply live hacks: debug logging for spam regex & blacklist hits X-Git-Tag: 1.31.0-rc.0~46930 X-Git-Url: http://git.cyclocoop.org/%24href?a=commitdiff_plain;h=1b2d01c2f1ef77308c9f155a51c19ae408113c13;p=lhc%2Fweb%2Fwiklou.git apply live hacks: debug logging for spam regex & blacklist hits --- diff --git a/includes/EditPage.php b/includes/EditPage.php index 1a9f4f752e..d94ba4918f 100644 --- a/includes/EditPage.php +++ b/includes/EditPage.php @@ -745,6 +745,10 @@ class EditPage { $matches = array(); if ( $wgSpamRegex && preg_match( $wgSpamRegex, $this->textbox1, $matches ) ) { $result['spam'] = $matches[0]; + $ip = wfGetIP(); + $pdbk = $this->mTitle->getPrefixedDBkey(); + $match = str_replace( "\n", '', $matches[0] ); + wfDebugLog( 'SpamRegex', "$ip spam regex hit [[$pdbk]]: \"$match\"" ); wfProfileOut( "$fname-checks" ); wfProfileOut( $fname ); return self::AS_SPAM_ERROR;