r113587 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r113586‎ | r113587 | r113588 >
Date:20:40, 11 March 2012
Author:reedy
Status:reverted
Tags:gerritmigration 
Comment:
A LOT of function level documentation
Modified paths:
  • /trunk/extensions/AbuseFilter/AbuseFilter.class.php (modified) (history)
  • /trunk/extensions/AbuseFilter/AbuseFilter.parser.php (modified) (history)
  • /trunk/extensions/AbuseFilter/AbuseFilterVariableHolder.php (modified) (history)

Diff [purge]

Index: trunk/extensions/AbuseFilter/AbuseFilter.parser.php
@@ -79,6 +79,11 @@
8080 $this->data = $val;
8181 }
8282
 83+ /**
 84+ * @param $var
 85+ * @return AFPData
 86+ * @throws AFPException
 87+ */
8388 public static function newFromPHPVar( $var ) {
8489 if ( is_string( $var ) ) {
8590 return new AFPData( self::DString, $var );
@@ -103,10 +108,19 @@
104109 }
105110 }
106111
 112+ /**
 113+ * @return AFPData
 114+ */
107115 public function dup() {
108116 return new AFPData( $this->type, $this->data );
109117 }
110118
 119+ /**
 120+ * @static
 121+ * @param $orig
 122+ * @param $target
 123+ * @return AFPData
 124+ */
111125 public static function castTypes( $orig, $target ) {
112126 if ( $orig->type == $target ) {
113127 return $orig->dup();
@@ -120,7 +134,7 @@
121135 return new AFPData( self::DBool, (bool)count( $orig->data ) );
122136 }
123137 if ( $target == self::DFloat ) {
124 - return new AFPData( self::DFloat, doubleval( count( $orig->data ) ) );
 138+ return new AFPData( self::DFloat, floatval( count( $orig->data ) ) );
125139 }
126140 if ( $target == self::DInt ) {
127141 return new AFPData( self::DInt, intval( count( $orig->data ) ) );
@@ -138,7 +152,7 @@
139153 return new AFPData( self::DBool, (bool)$orig->data );
140154 }
141155 if ( $target == self::DFloat ) {
142 - return new AFPData( self::DFloat, doubleval( $orig->data ) );
 156+ return new AFPData( self::DFloat, floatval( $orig->data ) );
143157 }
144158 if ( $target == self::DInt ) {
145159 return new AFPData( self::DInt, intval( $orig->data ) );
@@ -151,14 +165,28 @@
152166 }
153167 }
154168
 169+ /**
 170+ * @param $value
 171+ * @return AFPData
 172+ */
155173 public static function boolInvert( $value ) {
156174 return new AFPData( self::DBool, !$value->toBool() );
157175 }
158176
 177+ /**
 178+ * @param $base
 179+ * @param $exponent
 180+ * @return AFPData
 181+ */
159182 public static function pow( $base, $exponent ) {
160183 return new AFPData( self::DFloat, pow( $base->toFloat(), $exponent->toFloat() ) );
161184 }
162185
 186+ /**
 187+ * @param $a
 188+ * @param $b
 189+ * @return AFPData
 190+ */
163191 public static function keywordIn( $a, $b ) {
164192 $a = $a->toString();
165193 $b = $b->toString();
@@ -170,6 +198,11 @@
171199 return new AFPData( self::DBool, in_string( $a, $b ) );
172200 }
173201
 202+ /**
 203+ * @param $a
 204+ * @param $b
 205+ * @return AFPData
 206+ */
174207 public static function keywordContains( $a, $b ) {
175208 $a = $a->toString();
176209 $b = $b->toString();
@@ -181,6 +214,11 @@
182215 return new AFPData( self::DBool, in_string( $b, $a ) );
183216 }
184217
 218+ /**
 219+ * @param $value
 220+ * @param $list
 221+ * @return bool
 222+ */
185223 public static function listContains( $value, $list ) {
186224 // Should use built-in PHP function somehow
187225 foreach ( $list->data as $item ) {
@@ -191,11 +229,21 @@
192230 return false;
193231 }
194232
 233+ /**
 234+ * @param $d1
 235+ * @param $d2
 236+ * @return bool
 237+ */
195238 public static function equals( $d1, $d2 ) {
196239 return $d1->type != self::DList && $d2->type != self::DList &&
197240 $d1->toString() === $d2->toString();
198241 }
199242
 243+ /**
 244+ * @param $str
 245+ * @param $pattern
 246+ * @return AFPData
 247+ */
200248 public static function keywordLike( $str, $pattern ) {
201249 $str = $str->toString();
202250 $pattern = $pattern->toString();
@@ -205,6 +253,14 @@
206254 return new AFPData( self::DBool, (bool)$result );
207255 }
208256
 257+ /**
 258+ * @param $str
 259+ * @param $regex
 260+ * @param $pos
 261+ * @param $insensitive bool
 262+ * @return AFPData
 263+ * @throws Exception
 264+ */
209265 public static function keywordRegex( $str, $regex, $pos, $insensitive = false ) {
210266 $str = $str->toString();
211267 $pattern = $regex->toString();
@@ -228,10 +284,20 @@
229285 return new AFPData( self::DBool, (bool)$result );
230286 }
231287
 288+ /**
 289+ * @param $str
 290+ * @param $regex
 291+ * @param $pos
 292+ * @return AFPData
 293+ */
232294 public static function keywordRegexInsensitive( $str, $regex, $pos ) {
233295 return self::keywordRegex( $str, $regex, $pos, true );
234296 }
235297
 298+ /**
 299+ * @param $data
 300+ * @return AFPData
 301+ */
236302 public static function unaryMinus( $data ) {
237303 if ( $data->type == self::DInt ) {
238304 return new AFPData( $data->type, - $data->toInt() );
@@ -240,6 +306,13 @@
241307 }
242308 }
243309
 310+ /**
 311+ * @param $a
 312+ * @param $b
 313+ * @param $op
 314+ * @return AFPData
 315+ * @throws AFPException
 316+ */
244317 public static function boolOp( $a, $b, $op ) {
245318 $a = $a->toBool();
246319 $b = $b->toBool();
@@ -255,6 +328,13 @@
256329 throw new AFPException( "Invalid boolean operation: {$op}" ); // Should never happen.
257330 }
258331
 332+ /**
 333+ * @param $a
 334+ * @param $b
 335+ * @param $op
 336+ * @return AFPData
 337+ * @throws AFPException
 338+ */
259339 public static function compareOp( $a, $b, $op ) {
260340 if ( $op == '==' || $op == '=' ) {
261341 return new AFPData( self::DBool, self::equals( $a, $b ) );
@@ -285,6 +365,15 @@
286366 throw new AFPException( "Invalid comparison operation: {$op}" ); // Should never happen
287367 }
288368
 369+ /**
 370+ * @param $a
 371+ * @param $b
 372+ * @param $op
 373+ * @param $pos
 374+ * @return AFPData
 375+ * @throws AFPUserVisibleException
 376+ * @throws AFPException
 377+ */
289378 public static function mulRel( $a, $b, $op, $pos ) {
290379 // Figure out the type.
291380 if ( $a->type == self::DFloat || $b->type == self::DFloat ||
@@ -315,12 +404,17 @@
316405 if ( $type == self::DInt ) {
317406 $data = intval( $data );
318407 } else {
319 - $data = doubleval( $data );
 408+ $data = floatval( $data );
320409 }
321410
322411 return new AFPData( $type, $data );
323412 }
324413
 414+ /**
 415+ * @param $a
 416+ * @param $b
 417+ * @return AFPData
 418+ */
325419 public static function sum( $a, $b ) {
326420 if ( $a->type == self::DString || $b->type == self::DString ) {
327421 return new AFPData( self::DString, $a->toString() . $b->toString() );
@@ -331,6 +425,11 @@
332426 }
333427 }
334428
 429+ /**
 430+ * @param $a
 431+ * @param $b
 432+ * @return AFPData
 433+ */
335434 public static function sub( $a, $b ) {
336435 return new AFPData( self::DFloat, $a->toFloat() - $b->toFloat() );
337436 }
@@ -338,6 +437,7 @@
339438 /** Convert shorteners */
340439
341440 /**
 441+ * @throws MWException
342442 * @return mixed
343443 */
344444 public function toNative() {
@@ -434,6 +534,15 @@
435535 $this->pos = $pos;
436536 }
437537
 538+ /**
 539+ * @param $errno
 540+ * @param $errstr
 541+ * @param $errfile
 542+ * @param $errline
 543+ * @param $context
 544+ * @return bool
 545+ * @throws AFPUserVisibleException
 546+ */
438547 function handleError( $errno, $errstr, $errfile, $errline, $context ) {
439548 if ( error_reporting() == 0 ) {
440549 return true;
@@ -455,8 +564,13 @@
456565 }
457566
458567 class AbuseFilterParser {
459 - var $mParams, $mVars, $mCode, $mTokens, $mPos, $mCur, $mShortCircuit, $mAllowShort;
 568+ var $mParams, $mCode, $mTokens, $mPos, $mCur, $mShortCircuit, $mAllowShort, $mLen;
460569
 570+ /**
 571+ * @var AbuseFilterVariableHolder
 572+ */
 573+ var $mVars;
 574+
461575 // length,lcase,ccnorm,rmdoubles,specialratio,rmspecials,norm,count
462576 static $mFunctions = array(
463577 'lcase' => 'funcLc',
@@ -529,6 +643,10 @@
530644 $this->mAllowShort = true;
531645 }
532646
 647+ /**
 648+ * @param $filter
 649+ * @return array|bool
 650+ */
533651 public function checkSyntax( $filter ) {
534652 try {
535653 $origAS = $this->mAllowShort;
@@ -542,11 +660,18 @@
543661 return true;
544662 }
545663
 664+ /**
 665+ * @param $name
 666+ * @param $value
 667+ */
546668 public function setVar( $name, $value ) {
547669 $name = strtolower( $name );
548670 $this->mVars->setVar( $name, $value );
549671 }
550672
 673+ /**
 674+ * @param $vars
 675+ */
551676 public function setVars( $vars ) {
552677 if ( is_array( $vars ) ) {
553678 foreach ( $vars as $name => $var ) {
@@ -557,6 +682,9 @@
558683 }
559684 }
560685
 686+ /**
 687+ * @return AFPToken
 688+ */
561689 protected function move( ) {
562690 wfProfileIn( __METHOD__ );
563691 list( $val, $type, $code, $offset ) =
@@ -568,17 +696,28 @@
569697 return $this->mCur = $token;
570698 }
571699
572 - // getState() and setState() function allows parser state to be rollbacked to several tokens back
 700+ /**
 701+ * getState() function allows parser state to be rollbacked to several tokens back
 702+ * @return AFPParserState
 703+ */
573704 protected function getState() {
574705 return new AFPParserState( $this->mCur, $this->mPos );
575706 }
576707
 708+ /**
 709+ * setState() function allows parser state to be rollbacked to several tokens back
 710+ * @param AFPParserState $state
 711+ */
577712 protected function setState( AFPParserState $state ) {
578713 $this->mCur = $state->token;
579714 $this->mPos = $state->pos;
580715 self::$lastHandledToken = $state->lastInput;
581716 }
582717
 718+ /**
 719+ * @return mixed
 720+ * @throws AFPUserVisibleException
 721+ */
583722 protected function skipOverBraces() {
584723 if ( !( $this->mCur->type == AFPToken::TBrace && $this->mCur->value == '(' ) || !$this->mShortCircuit ) {
585724 return;
@@ -601,14 +740,26 @@
602741 throw new AFPUserVisibleException( 'expectednotfound', $this->mCur->pos, array( ')' ) );
603742 }
604743
 744+ /**
 745+ * @param $code
 746+ * @return bool
 747+ */
605748 public function parse( $code ) {
606749 return $this->intEval( $code )->toBool();
607750 }
608751
 752+ /**
 753+ * @param $filter
 754+ * @return string
 755+ */
609756 public function evaluateExpression( $filter ) {
610757 return $this->intEval( $filter )->toString();
611758 }
612759
 760+ /**
 761+ * @param $code
 762+ * @return AFPData
 763+ */
613764 function intEval( $code ) {
614765 // Setup, resetting
615766 $this->mCode = $code;
@@ -621,6 +772,11 @@
622773 return $result;
623774 }
624775
 776+ /**
 777+ * @param $a
 778+ * @param $b
 779+ * @return int
 780+ */
625781 static function lengthCompare( $a, $b ) {
626782 if ( strlen( $a ) == strlen( $b ) ) {
627783 return 0;
@@ -635,6 +791,7 @@
636792 * Handles unexpected characters after the expression
637793 *
638794 * @param $result
 795+ * @throws AFPUserVisibleException
639796 */
640797 protected function doLevelEntry( &$result ) {
641798 $this->doLevelSemicolon( $result );
@@ -661,6 +818,8 @@
662819 * Handles multiple expressions
663820 *
664821 * @param $result
 822+ * @throws AFPUserVisibleException
 823+ * @return
665824 */
666825 protected function doLevelSet( &$result ) {
667826 if ( $this->mCur->type == AFPToken::TID ) {
@@ -724,6 +883,10 @@
725884 $this->doLevelConditions( $result );
726885 }
727886
 887+ /**
 888+ * @param $result
 889+ * @throws AFPUserVisibleException
 890+ */
728891 protected function doLevelConditions( &$result ) {
729892 if ( $this->mCur->type == AFPToken::TKeyword && $this->mCur->value == 'if' ) {
730893 $this->move();
@@ -838,6 +1001,9 @@
8391002 }
8401003 }
8411004
 1005+ /**
 1006+ * @param $result
 1007+ */
8421008 protected function doLevelBoolOps( &$result ) {
8431009 $this->doLevelCompares( $result );
8441010 $ops = array( '&', '|', '^' );
@@ -876,6 +1042,9 @@
8771043 }
8781044 }
8791045
 1046+ /**
 1047+ * @param $result
 1048+ */
8801049 protected function doLevelCompares( &$result ) {
8811050 AbuseFilter::triggerLimiter();
8821051 $this->doLevelSumRels( $result );
@@ -891,6 +1060,9 @@
8921061 }
8931062 }
8941063
 1064+ /**
 1065+ * @param $result
 1066+ */
8951067 protected function doLevelSumRels( &$result ) {
8961068 $this->doLevelMulRels( $result );
8971069 wfProfileIn( __METHOD__ );
@@ -910,6 +1082,9 @@
9111083 wfProfileOut( __METHOD__ );
9121084 }
9131085
 1086+ /**
 1087+ * @param $result
 1088+ */
9141089 protected function doLevelMulRels( &$result ) {
9151090 $this->doLevelPow( $result );
9161091 wfProfileIn( __METHOD__ );
@@ -924,6 +1099,9 @@
9251100 wfProfileOut( __METHOD__ );
9261101 }
9271102
 1103+ /**
 1104+ * @param $result
 1105+ */
9281106 protected function doLevelPow( &$result ) {
9291107 $this->doLevelBoolInvert( $result );
9301108 wfProfileIn( __METHOD__ );
@@ -936,6 +1114,9 @@
9371115 wfProfileOut( __METHOD__ );
9381116 }
9391117
 1118+ /**
 1119+ * @param $result
 1120+ */
9401121 protected function doLevelBoolInvert( &$result ) {
9411122 if ( $this->mCur->type == AFPToken::TOp && $this->mCur->value == '!' ) {
9421123 $this->move();
@@ -948,6 +1129,9 @@
9491130 }
9501131 }
9511132
 1133+ /**
 1134+ * @param $result
 1135+ */
9521136 protected function doLevelSpecialWords( &$result ) {
9531137 $this->doLevelUnarys( $result );
9541138 $keyword = strtolower( $this->mCur->value );
@@ -979,6 +1163,9 @@
9801164 }
9811165 }
9821166
 1167+ /**
 1168+ * @param $result
 1169+ */
9831170 protected function doLevelUnarys( &$result ) {
9841171 $op = $this->mCur->value;
9851172 if ( $this->mCur->type == AFPToken::TOp && ( $op == "+" || $op == "-" ) ) {
@@ -994,6 +1181,10 @@
9951182 }
9961183 }
9971184
 1185+ /**
 1186+ * @param $result
 1187+ * @throws AFPUserVisibleException
 1188+ */
9981189 protected function doLevelListElements( &$result ) {
9991190 $this->doLevelBraces( $result );
10001191 while ( $this->mCur->type == AFPToken::TSquareBracket && $this->mCur->value == '[' ) {
@@ -1017,6 +1208,10 @@
10181209 }
10191210 }
10201211
 1212+ /**
 1213+ * @param $result
 1214+ * @throws AFPUserVisibleException
 1215+ */
10211216 protected function doLevelBraces( &$result ) {
10221217 if ( $this->mCur->type == AFPToken::TBrace && $this->mCur->value == '(' ) {
10231218 if ( $this->mShortCircuit ) {
@@ -1036,6 +1231,10 @@
10371232 }
10381233 }
10391234
 1235+ /**
 1236+ * @param $result
 1237+ * @throws AFPUserVisibleException
 1238+ */
10401239 protected function doLevelFunction( &$result ) {
10411240 if ( $this->mCur->type == AFPToken::TID && isset( self::$mFunctions[$this->mCur->value] ) ) {
10421241 wfProfileIn( __METHOD__ );
@@ -1104,6 +1303,11 @@
11051304 }
11061305 }
11071306
 1307+ /**
 1308+ * @param $result
 1309+ * @throws AFPUserVisibleException
 1310+ * @return AFPData
 1311+ */
11081312 protected function doLevelAtom( &$result ) {
11091313 wfProfileIn( __METHOD__ );
11101314 $tok = $this->mCur->value;
@@ -1186,6 +1390,11 @@
11871391
11881392 /* End of levels */
11891393
 1394+ /**
 1395+ * @param $var
 1396+ * @return AFPData
 1397+ * @throws AFPUserVisibleException
 1398+ */
11901399 protected function getVarValue( $var ) {
11911400 wfProfileIn( __METHOD__ );
11921401 $var = strtolower( $var );
@@ -1206,6 +1415,11 @@
12071416 }
12081417 }
12091418
 1419+ /**
 1420+ * @param $name
 1421+ * @param $value
 1422+ * @throws AFPUserVisibleException
 1423+ */
12101424 protected function setUserVariable( $name, $value ) {
12111425 $builderValues = AbuseFilter::getBuilderValues();
12121426 if ( array_key_exists( $name, $builderValues['vars'] ) ) {
@@ -1214,6 +1428,13 @@
12151429 $this->mVars->setVar( $name, $value );
12161430 }
12171431
 1432+ /**
 1433+ * @param $code
 1434+ * @param $offset
 1435+ * @return array
 1436+ * @throws AFPException
 1437+ * @throws AFPUserVisibleException
 1438+ */
12181439 static function nextToken( $code, $offset ) {
12191440 $tok = '';
12201441
@@ -1394,7 +1615,7 @@
13951616
13961617 return array(
13971618 $float
1398 - ? doubleval( $num )
 1619+ ? floatval( $num )
13991620 : intval( $num ),
14001621 $float
14011622 ? AFPToken::TFloat
@@ -1426,6 +1647,12 @@
14271648 }
14281649
14291650 // Built-in functions
 1651+
 1652+ /**
 1653+ * @param $args
 1654+ * @return AFPData
 1655+ * @throws AFPUserVisibleException
 1656+ */
14301657 protected function funcLc( $args ) {
14311658 global $wgContLang;
14321659 if ( count( $args ) < 1 ) {
@@ -1439,6 +1666,11 @@
14401667 return new AFPData( AFPData::DString, $wgContLang->lc( $s ) );
14411668 }
14421669
 1670+ /**
 1671+ * @param $args
 1672+ * @return AFPData
 1673+ * @throws AFPUserVisibleException
 1674+ */
14431675 protected function funcLen( $args ) {
14441676 if ( count( $args ) < 1 ) {
14451677 throw new AFPUserVisibleException(
@@ -1451,6 +1683,11 @@
14521684 return new AFPData( AFPData::DInt, mb_strlen( $s, 'utf-8' ) );
14531685 }
14541686
 1687+ /**
 1688+ * @param $args
 1689+ * @return AFPData
 1690+ * @throws AFPUserVisibleException
 1691+ */
14551692 protected function funcSimpleNorm( $args ) {
14561693 if ( count( $args ) < 1 ) {
14571694 throw new AFPUserVisibleException(
@@ -1466,6 +1703,11 @@
14671704 return new AFPData( AFPData::DString, $s );
14681705 }
14691706
 1707+ /**
 1708+ * @param $args
 1709+ * @return AFPData
 1710+ * @throws AFPUserVisibleException
 1711+ */
14701712 protected function funcSpecialRatio( $args ) {
14711713 if ( count( $args ) < 1 ) {
14721714 throw new AFPUserVisibleException(
@@ -1487,6 +1729,11 @@
14881730 return new AFPData( AFPData::DFloat, $val );
14891731 }
14901732
 1733+ /**
 1734+ * @param $args
 1735+ * @return AFPData
 1736+ * @throws AFPUserVisibleException
 1737+ */
14911738 protected function funcCount( $args ) {
14921739 if ( count( $args ) < 1 ) {
14931740 throw new AFPUserVisibleException(
@@ -1517,6 +1764,12 @@
15181765 return new AFPData( AFPData::DInt, $count );
15191766 }
15201767
 1768+ /**
 1769+ * @param $args
 1770+ * @return AFPData
 1771+ * @throws AFPUserVisibleException
 1772+ * @throws Exception
 1773+ */
15211774 protected function funcRCount( $args ) {
15221775 if ( count( $args ) < 1 ) {
15231776 throw new AFPUserVisibleException(
@@ -1552,6 +1805,11 @@
15531806 return new AFPData( AFPData::DInt, $count );
15541807 }
15551808
 1809+ /**
 1810+ * @param $args
 1811+ * @return AFPData
 1812+ * @throws AFPUserVisibleException
 1813+ */
15561814 protected function funcIPInRange( $args ) {
15571815 if ( count( $args ) < 2 ) {
15581816 throw new AFPUserVisibleException(
@@ -1569,6 +1827,11 @@
15701828 return new AFPData( AFPData::DBool, $result );
15711829 }
15721830
 1831+ /**
 1832+ * @param $args
 1833+ * @return AFPData
 1834+ * @throws AFPUserVisibleException
 1835+ */
15731836 protected function funcCCNorm( $args ) {
15741837 if ( count( $args ) < 1 ) {
15751838 throw new AFPUserVisibleException(
@@ -1585,6 +1848,11 @@
15861849 return new AFPData( AFPData::DString, $s );
15871850 }
15881851
 1852+ /**
 1853+ * @param $args
 1854+ * @return AFPData
 1855+ * @throws AFPUserVisibleException
 1856+ */
15891857 protected function funcContainsAny( $args ) {
15901858 if ( count( $args ) < 2 ) {
15911859 throw new AFPUserVisibleException(
@@ -1621,6 +1889,10 @@
16221890 return new AFPData( AFPData::DBool, $ok );
16231891 }
16241892
 1893+ /**
 1894+ * @param $s
 1895+ * @return mixed
 1896+ */
16251897 protected function ccnorm( $s ) {
16261898 static $equivset = null;
16271899 static $replacementArray = null;
@@ -1634,20 +1906,35 @@
16351907 return $replacementArray->replace( $s );
16361908 }
16371909
 1910+ /**
 1911+ * @param $s string
 1912+ * @return array|string
 1913+ */
16381914 protected function rmspecials( $s ) {
1639 - $s = preg_replace( '/[^\p{L}\p{N}]/u', '', $s );
1640 -
1641 - return $s;
 1915+ return preg_replace( '/[^\p{L}\p{N}]/u', '', $s );
16421916 }
16431917
 1918+ /**
 1919+ * @param $s string
 1920+ * @return array|string
 1921+ */
16441922 protected function rmdoubles( $s ) {
16451923 return preg_replace( '/(.)\1+/us', '\1', $s );
16461924 }
16471925
 1926+ /**
 1927+ * @param $s string
 1928+ * @return array|string
 1929+ */
16481930 protected function rmwhitespace( $s ) {
16491931 return preg_replace( '/\s+/u', '', $s );
16501932 }
16511933
 1934+ /**
 1935+ * @param $args array
 1936+ * @return AFPData
 1937+ * @throws AFPUserVisibleException
 1938+ */
16521939 protected function funcRMSpecials( $args ) {
16531940 if ( count( $args ) < 1 ) {
16541941 throw new AFPUserVisibleException(
@@ -1663,6 +1950,11 @@
16641951 return new AFPData( AFPData::DString, $s );
16651952 }
16661953
 1954+ /**
 1955+ * @param $args array
 1956+ * @return AFPData
 1957+ * @throws AFPUserVisibleException
 1958+ */
16671959 protected function funcRMWhitespace( $args ) {
16681960 if ( count( $args ) < 1 ) {
16691961 throw new AFPUserVisibleException(
@@ -1678,6 +1970,11 @@
16791971 return new AFPData( AFPData::DString, $s );
16801972 }
16811973
 1974+ /**
 1975+ * @param $args array
 1976+ * @return AFPData
 1977+ * @throws AFPUserVisibleException
 1978+ */
16821979 protected function funcRMDoubles( $args ) {
16831980 if ( count( $args ) < 1 ) {
16841981 throw new AFPUserVisibleException(
@@ -1693,6 +1990,11 @@
16941991 return new AFPData( AFPData::DString, $s );
16951992 }
16961993
 1994+ /**
 1995+ * @param $args array
 1996+ * @return AFPData
 1997+ * @throws AFPUserVisibleException
 1998+ */
16971999 protected function funcNorm( $args ) {
16982000 if ( count( $args ) < 1 ) {
16992001 throw new AFPUserVisibleException(
@@ -1711,6 +2013,11 @@
17122014 return new AFPData( AFPData::DString, $s );
17132015 }
17142016
 2017+ /**
 2018+ * @param $args array
 2019+ * @return AFPData
 2020+ * @throws AFPUserVisibleException
 2021+ */
17152022 protected function funcSubstr( $args ) {
17162023 if ( count( $args ) < 2 ) {
17172024 throw new AFPUserVisibleException(
@@ -1734,6 +2041,11 @@
17352042 return new AFPData( AFPData::DString, $result );
17362043 }
17372044
 2045+ /**
 2046+ * @param $args array
 2047+ * @return AFPData
 2048+ * @throws AFPUserVisibleException
 2049+ */
17382050 protected function funcStrPos( $args ) {
17392051 if ( count( $args ) < 2 ) {
17402052 throw new AFPUserVisibleException(
@@ -1760,6 +2072,11 @@
17612073 return new AFPData( AFPData::DInt, $result );
17622074 }
17632075
 2076+ /**
 2077+ * @param $args array
 2078+ * @return AFPData
 2079+ * @throws AFPUserVisibleException
 2080+ */
17642081 protected function funcStrReplace( $args ) {
17652082 if ( count( $args ) < 3 ) {
17662083 throw new AFPUserVisibleException(
@@ -1776,6 +2093,11 @@
17772094 return new AFPData( AFPData::DString, str_replace( $search, $replace, $subject ) );
17782095 }
17792096
 2097+ /**
 2098+ * @param $args array
 2099+ * @return AFPData
 2100+ * @throws AFPUserVisibleException
 2101+ */
17802102 protected function funcStrRegexEscape( $args ) {
17812103 if ( count( $args ) < 1 ) {
17822104 throw new AFPUserVisibleException( 'notenoughargs', $this->mCur->pos,
@@ -1788,6 +2110,11 @@
17892111 return new AFPData( AFPData::DString, preg_quote( $string ) );
17902112 }
17912113
 2114+ /**
 2115+ * @param $args array
 2116+ * @return mixed
 2117+ * @throws AFPUserVisibleException
 2118+ */
17922119 protected function funcSetVar( $args ) {
17932120 if ( count( $args ) < 2 ) {
17942121 throw new AFPUserVisibleException(
@@ -1805,6 +2132,11 @@
18062133 return $value;
18072134 }
18082135
 2136+ /**
 2137+ * @param $args array
 2138+ * @return AFPData
 2139+ * @throws AFPUserVisibleException
 2140+ */
18092141 protected function castString( $args ) {
18102142 if ( count( $args ) < 1 ) {
18112143 throw new AFPUserVisibleException( 'noparams', $this->mCur->pos, array( __METHOD__ ) );
@@ -1814,6 +2146,11 @@
18152147 return AFPData::castTypes( $val, AFPData::DString );
18162148 }
18172149
 2150+ /**
 2151+ * @param $args array
 2152+ * @return AFPData
 2153+ * @throws AFPUserVisibleException
 2154+ */
18182155 protected function castInt( $args ) {
18192156 if ( count( $args ) < 1 ) {
18202157 throw new AFPUserVisibleException( 'noparams', $this->mCur->pos, array( __METHOD__ ) );
@@ -1823,6 +2160,11 @@
18242161 return AFPData::castTypes( $val, AFPData::DInt );
18252162 }
18262163
 2164+ /**
 2165+ * @param $args array
 2166+ * @return AFPData
 2167+ * @throws AFPUserVisibleException
 2168+ */
18272169 protected function castFloat( $args ) {
18282170 if ( count( $args ) < 1 ) {
18292171 throw new AFPUserVisibleException( 'noparams', $this->mCur->pos, array( __METHOD__ ) );
@@ -1832,6 +2174,11 @@
18332175 return AFPData::castTypes( $val, AFPData::DFloat );
18342176 }
18352177
 2178+ /**
 2179+ * @param $args array
 2180+ * @return AFPData
 2181+ * @throws AFPUserVisibleException
 2182+ */
18362183 protected function castBool( $args ) {
18372184 if ( count( $args ) < 1 ) {
18382185 throw new AFPUserVisibleException( 'noparams', $this->mCur->pos, array( __METHOD__ ) );
Index: trunk/extensions/AbuseFilter/AbuseFilter.class.php
@@ -120,6 +120,10 @@
121121 );
122122 public static $editboxName = null;
123123
 124+ /**
 125+ * @param $context IContextSource
 126+ * @param $pageType
 127+ */
124128 public static function addNavigationLinks( IContextSource $context, $pageType ) {
125129 $linkDefs = array(
126130 'home' => 'Special:AbuseFilter',
@@ -159,7 +163,7 @@
160164 if ( $name == $pageType ) {
161165 $links[] = Xml::tags( 'strong', null, $msg );
162166 } else {
163 - $links[] = $context->getSkin()->link( $title, $msg );
 167+ $links[] = Linker::link( $title, $msg );
164168 }
165169 }
166170
@@ -192,6 +196,9 @@
193197 return $vars;
194198 }
195199
 200+ /**
 201+ * @return array
 202+ */
196203 public static function getBuilderValues() {
197204 static $realValues = null;
198205
@@ -205,6 +212,10 @@
206213 return $realValues;
207214 }
208215
 216+ /**
 217+ * @param $filter
 218+ * @return bool
 219+ */
209220 public static function filterHidden( $filter ) {
210221 $globalIndex = self::decodeGlobalName( $filter );
211222 if ( $globalIndex ) {
@@ -226,6 +237,10 @@
227238 return $hidden ? true : false;
228239 }
229240
 241+ /**
 242+ * @param $val int
 243+ * @throws MWException
 244+ */
230245 public static function triggerLimiter( $val = 1 ) {
231246 self::$condCount += $val;
232247
@@ -242,9 +257,8 @@
243258 }
244259
245260 /**
246 - * @static
247 - * @param $title Title
248 - * @param $prefix
 261+ * @param $title Title
 262+ * @param $prefix
249263 * @return AbuseFilterVariableHolder
250264 */
251265 public static function generateTitleVars( $title, $prefix ) {
@@ -280,6 +294,10 @@
281295 return $vars;
282296 }
283297
 298+ /**
 299+ * @param $filter
 300+ * @return mixed
 301+ */
284302 public static function checkSyntax( $filter ) {
285303 global $wgAbuseFilterParserClass;
286304
@@ -288,6 +306,11 @@
289307 return $parser->checkSyntax( $filter );
290308 }
291309
 310+ /**
 311+ * @param $expr
 312+ * @param array $vars
 313+ * @return string
 314+ */
292315 public static function evaluateExpression( $expr, $vars = array() ) {
293316 global $wgAbuseFilterParserClass;
294317
@@ -302,6 +325,14 @@
303326 return $parser->evaluateExpression( $expr );
304327 }
305328
 329+ /**
 330+ * @param $conds
 331+ * @param $vars
 332+ * @param $ignoreError bool
 333+ * @param $keepVars string
 334+ * @return bool
 335+ * @throws Exception
 336+ */
306337 public static function checkConditions(
307338 $conds,
308339 $vars,
@@ -392,6 +423,14 @@
393424 return $filter_matched;
394425 }
395426
 427+ /**
 428+ * @static
 429+ * @param $row
 430+ * @param $vars
 431+ * @param $profile bool
 432+ * @param $prefix string
 433+ * @return bool
 434+ */
396435 public static function checkFilter( $row, $vars, $profile = false, $prefix = '' ) {
397436 $filterID = $prefix . $row->af_id;
398437
@@ -431,6 +470,9 @@
432471 return $result;
433472 }
434473
 474+ /**
 475+ * @param $filter
 476+ */
435477 public static function resetFilterProfile( $filter ) {
436478 global $wgMemc;
437479 $countKey = wfMemcKey( 'abusefilter', 'profile', $filter, 'count' );
@@ -440,6 +482,11 @@
441483 $wgMemc->delete( $totalKey );
442484 }
443485
 486+ /**
 487+ * @param $filter
 488+ * @param $time
 489+ * @param $conds
 490+ */
444491 public static function recordProfilingResult( $filter, $time, $conds ) {
445492 global $wgMemc;
446493
@@ -462,6 +509,10 @@
463510 }
464511 }
465512
 513+ /**
 514+ * @param $filter
 515+ * @return array
 516+ */
466517 public static function getFilterProfile( $filter ) {
467518 global $wgMemc;
468519
@@ -491,7 +542,7 @@
492543 *
493544 * @param $filter string
494545 *
495 - * @return string|false
 546+ * @return string|bool
496547 */
497548 public static function decodeGlobalName( $filter ) {
498549 if ( strpos( $filter, 'global-' ) == 0 ) {
@@ -501,6 +552,10 @@
502553 return false;
503554 }
504555
 556+ /**
 557+ * @param $filters array
 558+ * @return array
 559+ */
505560 public static function getConsequencesForFilters( $filters ) {
506561 $globalFilters = array();
507562 $localFilters = array();
@@ -536,6 +591,12 @@
537592 return $consequences;
538593 }
539594
 595+ /**
 596+ * @param $dbr DatabaseBase
 597+ * @param $filters array
 598+ * @param $prefix string
 599+ * @return array
 600+ */
540601 public static function loadConsequencesFromDB( $dbr, $filters, $prefix = '' ) {
541602 $actionsByFilter = array();
542603 foreach ( $filters as $filter ) {
@@ -670,6 +731,11 @@
671732 return array( $actionsTaken, implode( "\n", $messages ) );
672733 }
673734
 735+ /**
 736+ * @param $vars AbuseFilterVariableHolder
 737+ * @param $title
 738+ * @return bool
 739+ */
674740 public static function filterAction( $vars, $title ) {
675741 global $wgUser, $wgTitle;
676742
@@ -731,6 +797,13 @@
732798 return $error_msg;
733799 }
734800
 801+ /**
 802+ * @param $actions_taken
 803+ * @param $log_template
 804+ * @param $action
 805+ * @param $vars AbuseFilterVariableHolder
 806+ * @return mixed
 807+ */
735808 public static function addLogEntries( $actions_taken, $log_template, $action, $vars ) {
736809 wfProfileIn( __METHOD__ );
737810 $dbw = wfGetDB( DB_MASTER );
@@ -961,6 +1034,14 @@
9621035 return $obj;
9631036 }
9641037
 1038+ /**
 1039+ * @param $action
 1040+ * @param $parameters
 1041+ * @param $title
 1042+ * @param $vars AbuseFilterVariableHolder
 1043+ * @param $rule_desc
 1044+ * @return string
 1045+ */
9651046 public static function takeConsequenceAction( $action, $parameters, $title,
9661047 $vars, $rule_desc )
9671048 {
@@ -1120,6 +1201,14 @@
11211202 return $display;
11221203 }
11231204
 1205+ /**
 1206+ * @param $throttleId
 1207+ * @param $types
 1208+ * @param $title
 1209+ * @param $rateCount
 1210+ * @param $ratePeriod
 1211+ * @return bool
 1212+ */
11241213 public static function isThrottled( $throttleId, $types, $title, $rateCount, $ratePeriod ) {
11251214 global $wgMemc;
11261215
@@ -1148,6 +1237,11 @@
11491238 return false; // NOT THROTTLED
11501239 }
11511240
 1241+ /**
 1242+ * @param $type
 1243+ * @param $title Title
 1244+ * @return Int|string
 1245+ */
11521246 public static function throttleIdentifier( $type, $title ) {
11531247 global $wgUser;
11541248
@@ -1178,6 +1272,12 @@
11791273 return $identifier;
11801274 }
11811275
 1276+ /**
 1277+ * @param $throttleId
 1278+ * @param $type
 1279+ * @param $title Title
 1280+ * @return String
 1281+ */
11821282 public static function throttleKey( $throttleId, $type, $title ) {
11831283 $types = explode( ',', $type );
11841284
@@ -1192,10 +1292,17 @@
11931293 return wfMemcKey( 'abusefilter', 'throttle', $throttleId, $type, $identifier );
11941294 }
11951295
 1296+ /**
 1297+ * @param $user User
 1298+ * @return String
 1299+ */
11961300 public static function autoPromoteBlockKey( $user ) {
11971301 return wfMemcKey( 'abusefilter', 'block-autopromote', $user->getId() );
11981302 }
11991303
 1304+ /**
 1305+ * @param $filters
 1306+ */
12001307 public static function recordStats( $filters ) {
12011308 global $wgAbuseFilterConditionLimit, $wgMemc;
12021309
@@ -1234,6 +1341,10 @@
12351342 wfProfileOut( __METHOD__ );
12361343 }
12371344
 1345+ /**
 1346+ * @param $filters
 1347+ * @param $total
 1348+ */
12381349 public static function checkEmergencyDisable( $filters, $total ) {
12391350 global $wgAbuseFilterEmergencyDisableThreshold, $wgAbuseFilterEmergencyDisableCount,
12401351 $wgAbuseFilterEmergencyDisableAge, $wgMemc;
@@ -1272,18 +1383,31 @@
12731384 }
12741385 }
12751386
 1387+ /**
 1388+ * @return String
 1389+ */
12761390 public static function filterLimitReachedKey() {
12771391 return wfMemcKey( 'abusefilter', 'stats', 'overflow' );
12781392 }
12791393
 1394+ /**
 1395+ * @return String
 1396+ */
12801397 public static function filterUsedKey() {
12811398 return wfMemcKey( 'abusefilter', 'stats', 'total' );
12821399 }
12831400
 1401+ /**
 1402+ * @param $filter
 1403+ * @return String
 1404+ */
12841405 public static function filterMatchesKey( $filter = null ) {
12851406 return wfMemcKey( 'abusefilter', 'stats', 'matches', $filter );
12861407 }
12871408
 1409+ /**
 1410+ * @return User
 1411+ */
12881412 public static function getFilterUser() {
12891413 $user = User::newFromName( wfMsgForContent( 'abusefilter-blocker' ) );
12901414 $user->load();
@@ -1318,6 +1442,7 @@
13191443 * @param $textName String
13201444 * @param $addResultDiv Boolean
13211445 * @param $canEdit Boolean
 1446+ * @return string
13221447 */
13231448 static function buildEditBox( $rules, $textName = 'wpFilterRules', $addResultDiv = true,
13241449 $canEdit = true ) {
@@ -1442,6 +1567,10 @@
14431568 return array_unique( $differences );
14441569 }
14451570
 1571+ /**
 1572+ * @param $row
 1573+ * @return array
 1574+ */
14461575 static function translateFromHistory( $row ) {
14471576 # Translate into an abuse_filter row with some black magic.
14481577 # This is ever so slightly evil!
@@ -1477,12 +1606,20 @@
14781607 return array( $af_row, $actions_output );
14791608 }
14801609
 1610+ /**
 1611+ * @param $action string
 1612+ * @return String
 1613+ */
14811614 static function getActionDisplay( $action ) {
14821615 $display = wfMsg( "abusefilter-action-$action" );
14831616 $display = wfEmptyMsg( "abusefilter-action-$action", $display ) ? $action : $display;
14841617 return $display;
14851618 }
14861619
 1620+ /**
 1621+ * @param $row
 1622+ * @return AbuseFilterVariableHolder|null
 1623+ */
14871624 public static function getVarsFromRCRow( $row ) {
14881625 if ( $row->rc_this_oldid ) {
14891626 // It's an edit.
@@ -1502,6 +1639,10 @@
15031640 return $vars;
15041641 }
15051642
 1643+ /**
 1644+ * @param $row
 1645+ * @return AbuseFilterVariableHolder
 1646+ */
15061647 public static function getCreateVarsFromRCRow( $row ) {
15071648 $vars = new AbuseFilterVariableHolder;
15081649
@@ -1518,6 +1659,10 @@
15191660 return $vars;
15201661 }
15211662
 1663+ /**
 1664+ * @param $row
 1665+ * @return AbuseFilterVariableHolder
 1666+ */
15221667 public static function getEditVarsFromRCRow( $row ) {
15231668 $vars = new AbuseFilterVariableHolder;
15241669 $title = Title::makeTitle( $row->rc_namespace, $row->rc_title );
@@ -1551,6 +1696,10 @@
15521697 return $vars;
15531698 }
15541699
 1700+ /**
 1701+ * @param $row
 1702+ * @return AbuseFilterVariableHolder
 1703+ */
15551704 public static function getMoveVarsFromRCRow( $row ) {
15561705 $vars = new AbuseFilterVariableHolder;
15571706
@@ -1580,8 +1729,8 @@
15811730 }
15821731
15831732 /**
1584 - * @static
1585 - * @param $title Title
 1733+ * @param $title Title
 1734+ * @param $article Array
15861735 * @return AbuseFilterVariableHolder
15871736 */
15881737 public static function getEditVars( $title, $article = null ) {
@@ -1640,6 +1789,10 @@
16411790 return $vars;
16421791 }
16431792
 1793+ /**
 1794+ * @param $vars AbuseFilterVariableHolder
 1795+ * @return string
 1796+ */
16441797 public static function buildVarDumpTable( $vars ) {
16451798 // Export all values
16461799 if ( $vars instanceof AbuseFilterVariableHolder ) {
@@ -1693,20 +1846,32 @@
16941847 return $output;
16951848 }
16961849
 1850+ /**
 1851+ * @param $page
 1852+ * @param $type
 1853+ * @param $title Title
 1854+ * @param $sk Skin
 1855+ * @param $args array
 1856+ * @return String
 1857+ */
16971858 static function modifyActionText( $page, $type, $title, $sk, $args ) {
16981859 list( $history_id, $filter_id ) = $args;
16991860
1700 - $filter_link = $sk ? $sk->link( $title ) : $title->getCanonicalURL();
 1861+ $filter_link = Linker::link( $title );
17011862
17021863 $details_title = SpecialPage::getTitleFor( 'AbuseFilter', "history/$filter_id/diff/prev/$history_id" );
17031864 $details_text = wfMsgExt( 'abusefilter-log-detailslink', 'parseinline' );
1704 - $details_link =
1705 - $sk ? $sk->link( $details_title, $details_text ) : $details_title->getCanonicalURL();
 1865+ $details_link = Linker::link( $details_title, $details_text );
17061866
17071867 return wfMsgExt( 'abusefilter-log-entry-modify',
17081868 array( 'parseinline', 'replaceafter' ), array( $filter_link, $details_link ) );
17091869 }
17101870
 1871+ /**
 1872+ * @param $action
 1873+ * @param $parameters
 1874+ * @return String
 1875+ */
17111876 static function formatAction( $action, $parameters ) {
17121877 global $wgLang;
17131878 if ( count( $parameters ) == 0 ) {
@@ -1719,6 +1884,10 @@
17201885 return $displayAction;
17211886 }
17221887
 1888+ /**
 1889+ * @param $value array
 1890+ * @return string
 1891+ */
17231892 static function formatFlags( $value ) {
17241893 global $wgLang;
17251894 $flags = array_filter( explode( ',', $value ) );
@@ -1729,6 +1898,9 @@
17301899 return $wgLang->commaList( $flags_display );
17311900 }
17321901
 1902+ /**
 1903+ * @param $data string
 1904+ */
17331905 static function sendToUDP( $data ) {
17341906 global $wgAbuseFilterUDPPrefix, $wgAbuseFilterUDPAddress, $wgAbuseFilterUDPPort;
17351907
@@ -1740,11 +1912,15 @@
17411913 );
17421914 }
17431915
 1916+ /**
 1917+ * @param $filterID
 1918+ * @return bool|mixed|string
 1919+ */
17441920 static function getGlobalFilterDescription( $filterID ) {
17451921 global $wgAbuseFilterCentralDB;
17461922
17471923 if ( !$wgAbuseFilterCentralDB ) {
1748 - return;
 1924+ return '';
17491925 }
17501926
17511927 $fdb = wfGetDB( DB_SLAVE, array(), $wgAbuseFilterCentralDB );
Index: trunk/extensions/AbuseFilter/AbuseFilterVariableHolder.php
@@ -3,6 +3,10 @@
44 var $mVars = array();
55 static $varBlacklist = array( 'context' );
66
 7+ /**
 8+ * @param $variable
 9+ * @param $datum
 10+ */
711 function setVar( $variable, $datum ) {
812 $variable = strtolower( $variable );
913 if ( !( $datum instanceof AFPData || $datum instanceof AFComputedVariable ) ) {
@@ -12,11 +16,20 @@
1317 $this->mVars[$variable] = $datum;
1418 }
1519
 20+ /**
 21+ * @param $variable
 22+ * @param $method
 23+ * @param $parameters
 24+ */
1625 function setLazyLoadVar( $variable, $method, $parameters ) {
1726 $placeholder = new AFComputedVariable( $method, $parameters );
1827 $this->setVar( $variable, $placeholder );
1928 }
2029
 30+ /**
 31+ * @param $variable
 32+ * @return AFPData
 33+ */
2134 function getVar( $variable ) {
2235 $variable = strtolower( $variable );
2336 if ( isset( $this->mVars[$variable] ) ) {
@@ -32,6 +45,9 @@
3346 }
3447 }
3548
 49+ /**
 50+ * @return AbuseFilterVariableHolder
 51+ */
3652 static function merge() {
3753 $newHolder = new AbuseFilterVariableHolder;
3854
@@ -42,6 +58,10 @@
4359 return $newHolder;
4460 }
4561
 62+ /**
 63+ * @param $addHolder
 64+ * @throws MWException
 65+ */
4666 function addHolder( $addHolder ) {
4767 if ( !is_object( $addHolder ) ) {
4868 throw new MWException( 'Invalid argument to AbuseFilterVariableHolder::addHolder' );
@@ -54,6 +74,9 @@
5575 $this->setVar( 'context', 'stored' );
5676 }
5777
 78+ /**
 79+ * @return array
 80+ */
5881 function exportAllVars() {
5982 $allVarNames = array_keys( $this->mVars );
6083 $exported = array();
@@ -67,6 +90,10 @@
6891 return $exported;
6992 }
7093
 94+ /**
 95+ * @param $var
 96+ * @return bool
 97+ */
7198 function varIsSet( $var ) {
7299 return array_key_exists( $var, $this->mVars );
73100 }
@@ -102,6 +129,10 @@
103130 static $userCache = array();
104131 static $articleCache = array();
105132
 133+ /**
 134+ * @param $method
 135+ * @param $parameters
 136+ */
106137 function __construct( $method, $parameters ) {
107138 $this->mMethod = $method;
108139 $this->mParameters = $parameters;
@@ -119,7 +150,7 @@
120151 function parseNonEditWikitext( $wikitext, $article ) {
121152 static $cache = array();
122153
123 - $cacheKey = md5( $wikitext ) . ':' . $article->mTitle->getPrefixedText();
 154+ $cacheKey = md5( $wikitext ) . ':' . $article->getTitle()->getPrefixedText();
124155
125156 if ( isset( $cache[$cacheKey] ) ) {
126157 return $cache[$cacheKey];
@@ -135,6 +166,10 @@
136167 return $edit;
137168 }
138169
 170+ /**
 171+ * @param $username string
 172+ * @return User
 173+ */
139174 static function userObjectFromName( $username ) {
140175 if ( isset( self::$userCache[$username] ) ) {
141176 return self::$userCache[$username];
@@ -160,6 +195,11 @@
161196 return $user;
162197 }
163198
 199+ /**
 200+ * @param $namespace
 201+ * @param $title Title
 202+ * @return Article
 203+ */
164204 static function articleFromTitle( $namespace, $title ) {
165205 if ( isset( self::$articleCache["$namespace:$title"] ) ) {
166206 return self::$articleCache["$namespace:$title"];
@@ -177,6 +217,10 @@
178218 return self::$articleCache["$namespace:$title"];
179219 }
180220
 221+ /**
 222+ * @param $article Article
 223+ * @return array
 224+ */
181225 static function getLinksFromDB( $article ) {
182226 // Stolen from ConfirmEdit
183227 $id = $article->getId();
@@ -198,6 +242,12 @@
199243 return $links;
200244 }
201245
 246+ /**
 247+ * @param $vars AbuseFilterVariableHolder
 248+ * @return AFPData|array|int|mixed|null|string
 249+ * @throws MWException
 250+ * @throws AFPException
 251+ */
202252 function compute( $vars ) {
203253 $parameters = $this->mParameters;
204254 $result = null;

Follow-up revisions

RevisionCommit summaryAuthorDate
r114396Revert r111217 (unreviewed rev in AbuseFilter) and its dependencies r113585, ...catrope19:41, 21 March 2012

Status & tagging log