mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/AbuseFilter.git
synced 2024-11-24 06:03:49 +00:00
Revert half-done code introduced in r48372
This commit is contained in:
parent
0e070fac7f
commit
a8a4d7fc5a
|
@ -288,7 +288,7 @@ class AFPUserVisibleException extends AFPException {
|
|||
}
|
||||
|
||||
class AbuseFilterParser {
|
||||
var $mParams, $mVars, $mCode, $mTokens, $mPos, $mCur, $mSubexpressions, $mDebug;
|
||||
var $mParams, $mVars, $mCode, $mTokens, $mPos, $mCur;
|
||||
|
||||
// length,lcase,ccnorm,rmdoubles,specialratio,rmspecials,norm,count
|
||||
static $mFunctions = array(
|
||||
|
@ -341,8 +341,6 @@ class AbuseFilterParser {
|
|||
$this->mTokens = array();
|
||||
$this->mVars = new AbuseFilterVariableHolder;
|
||||
$this->mPos = 0;
|
||||
$this->mDebug = false;
|
||||
$this->mSubexpressions = array();
|
||||
}
|
||||
|
||||
public function checkSyntax( $filter ) {
|
||||
|
@ -413,28 +411,6 @@ class AbuseFilterParser {
|
|||
return ( strlen($a) < strlen($b) ) ? -1 : 1;
|
||||
}
|
||||
|
||||
protected function createSubexpression( $value, $tokens, $type = null ) {
|
||||
if ($type)
|
||||
$data = new AFPData( $type, $value );
|
||||
else
|
||||
$data = AFPData::newFromPHPVar( $value );
|
||||
|
||||
if (!$this->mDebug)
|
||||
return $data;
|
||||
|
||||
if (!$this->mSubexpressions)
|
||||
$this->mSubexpressions = array();
|
||||
|
||||
$thisData = array(
|
||||
'tokens' => $tokens,
|
||||
'value' => $data,
|
||||
);
|
||||
|
||||
$this->mSubexpressions[] = $thisData;
|
||||
|
||||
return $data;
|
||||
}
|
||||
|
||||
/* Levels */
|
||||
|
||||
/** Handles unexpected characters after the expression */
|
||||
|
|
Loading…
Reference in a new issue