r62429 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r62428‎ | r62429 | r62430 >
Date:14:10, 13 February 2010
Author:siebrand
Status:ok
Tags:
Comment:
Update code formatting, run stylize.php, whitespace updates
Modified paths:
  • /trunk/extensions/AbuseFilter/AbuseFilter.class.php (modified) (history)
  • /trunk/extensions/AbuseFilter/AbuseFilter.hooks.php (modified) (history)
  • /trunk/extensions/AbuseFilter/AbuseFilter.i18n.php (modified) (history)
  • /trunk/extensions/AbuseFilter/AbuseFilter.parser.php (modified) (history)
  • /trunk/extensions/AbuseFilter/AbuseFilterVariableHolder.php (modified) (history)
  • /trunk/extensions/AbuseFilter/ApiQueryAbuseFilters.php (modified) (history)
  • /trunk/extensions/AbuseFilter/ApiQueryAbuseLog.php (modified) (history)
  • /trunk/extensions/AbuseFilter/SpecialAbuseFilter.php (modified) (history)
  • /trunk/extensions/AbuseFilter/SpecialAbuseLog.php (modified) (history)
  • /trunk/extensions/AbuseFilter/Views/AbuseFilterView.php (modified) (history)
  • /trunk/extensions/AbuseFilter/Views/AbuseFilterViewDiff.php (modified) (history)
  • /trunk/extensions/AbuseFilter/Views/AbuseFilterViewEdit.php (modified) (history)
  • /trunk/extensions/AbuseFilter/Views/AbuseFilterViewExamine.php (modified) (history)
  • /trunk/extensions/AbuseFilter/Views/AbuseFilterViewHistory.php (modified) (history)
  • /trunk/extensions/AbuseFilter/Views/AbuseFilterViewImport.php (modified) (history)
  • /trunk/extensions/AbuseFilter/Views/AbuseFilterViewList.php (modified) (history)
  • /trunk/extensions/AbuseFilter/Views/AbuseFilterViewRevert.php (modified) (history)
  • /trunk/extensions/AbuseFilter/Views/AbuseFilterViewTestBatch.php (modified) (history)
  • /trunk/extensions/AbuseFilter/Views/AbuseFilterViewTools.php (modified) (history)
  • /trunk/extensions/AbuseFilter/install.php (modified) (history)
  • /trunk/extensions/AbuseFilter/phpTest.php (modified) (history)

Diff [purge]

Index: trunk/extensions/AbuseFilter/AbuseFilter.parser.php
@@ -62,7 +62,7 @@
6363 }
6464
6565 class AFPData {
66 - //Datatypes
 66+ // Datatypes
6767 const DInt = 'int';
6868 const DString = 'string';
6969 const DNull = 'null';
@@ -79,21 +79,21 @@
8080 }
8181
8282 public static function newFromPHPVar( $var ) {
83 - if( is_string( $var ) )
 83+ if ( is_string( $var ) )
8484 return new AFPData( self::DString, $var );
85 - elseif( is_int( $var ) )
 85+ elseif ( is_int( $var ) )
8686 return new AFPData( self::DInt, $var );
87 - elseif( is_float( $var ) )
 87+ elseif ( is_float( $var ) )
8888 return new AFPData( self::DFloat, $var );
89 - elseif( is_bool( $var ) )
 89+ elseif ( is_bool( $var ) )
9090 return new AFPData( self::DBool, $var );
91 - elseif( is_array( $var ) ) {
 91+ elseif ( is_array( $var ) ) {
9292 $result = array();
93 - foreach( $var as $item )
 93+ foreach ( $var as $item )
9494 $result[] = self::newFromPHPVar( $item );
9595 return new AFPData( self::DList, $result );
9696 }
97 - elseif( is_null( $var ) )
 97+ elseif ( is_null( $var ) )
9898 return new AFPData();
9999 else
100100 throw new AFPException(
@@ -105,42 +105,42 @@
106106 }
107107
108108 public static function castTypes( $orig, $target ) {
109 - if( $orig->type == $target )
 109+ if ( $orig->type == $target )
110110 return $orig->dup();
111 - if( $target == self::DNull ) {
 111+ if ( $target == self::DNull ) {
112112 return new AFPData();
113113 }
114114
115 - if( $orig->type == self::DList ) {
116 - if( $target == self::DBool )
 115+ if ( $orig->type == self::DList ) {
 116+ if ( $target == self::DBool )
117117 return new AFPData( self::DBool, (bool)count( $orig->data ) );
118 - if( $target == self::DFloat ) {
 118+ if ( $target == self::DFloat ) {
119119 return new AFPData( self::DFloat, doubleval( count( $orig->data ) ) );
120120 }
121 - if( $target == self::DInt ) {
 121+ if ( $target == self::DInt ) {
122122 return new AFPData( self::DInt, intval( count( $orig->data ) ) );
123123 }
124 - if( $target == self::DString ) {
 124+ if ( $target == self::DString ) {
125125 $s = '';
126 - foreach( $orig->data as $item )
 126+ foreach ( $orig->data as $item )
127127 $s .= $item->toString() . "\n";
128128 return new AFPData( self::DString, $s );
129129 }
130130 }
131131
132 - if( $target == self::DBool ) {
 132+ if ( $target == self::DBool ) {
133133 return new AFPData( self::DBool, (bool)$orig->data );
134134 }
135 - if( $target == self::DFloat ) {
 135+ if ( $target == self::DFloat ) {
136136 return new AFPData( self::DFloat, doubleval( $orig->data ) );
137137 }
138 - if( $target == self::DInt ) {
 138+ if ( $target == self::DInt ) {
139139 return new AFPData( self::DInt, intval( $orig->data ) );
140140 }
141 - if( $target == self::DString ) {
 141+ if ( $target == self::DString ) {
142142 return new AFPData( self::DString, strval( $orig->data ) );
143143 }
144 - if( $target == self::DList ) {
 144+ if ( $target == self::DList ) {
145145 return new AFPData( self::DList, array( $orig ) );
146146 }
147147 }
@@ -177,8 +177,8 @@
178178
179179 public static function listContains( $value, $list ) {
180180 // Should use built-in PHP function somehow
181 - foreach( $list->data as $item ) {
182 - if( self::equals( $value, $item ) )
 181+ foreach ( $list->data as $item ) {
 182+ if ( self::equals( $value, $item ) )
183183 return true;
184184 }
185185 return false;
@@ -209,7 +209,7 @@
210210 set_error_handler( array( 'AbuseFilterParser', 'regexErrorHandler' ) );
211211 $result = preg_match( $pattern, $str );
212212 restore_error_handler();
213 - } catch( Exception $e ) {
 213+ } catch ( Exception $e ) {
214214 restore_error_handler();
215215 throw $e;
216216 }
@@ -218,47 +218,47 @@
219219
220220 public static function unaryMinus( $data ) {
221221 if ( $data->type == self::DInt ) {
222 - return new AFPData( $data->type, -$data->toInt() );
 222+ return new AFPData( $data->type, - $data->toInt() );
223223 } else {
224 - return new AFPData( $data->type, -$data->toFloat() );
 224+ return new AFPData( $data->type, - $data->toFloat() );
225225 }
226226 }
227227
228228 public static function boolOp( $a, $b, $op ) {
229229 $a = $a->toBool();
230230 $b = $b->toBool();
231 - if( $op == '|' )
 231+ if ( $op == '|' )
232232 return new AFPData( self::DBool, $a || $b );
233 - if( $op == '&' )
 233+ if ( $op == '&' )
234234 return new AFPData( self::DBool, $a && $b );
235 - if( $op == '^' )
 235+ if ( $op == '^' )
236236 return new AFPData( self::DBool, $a xor $b );
237237 throw new AFPException( "Invalid boolean operation: {$op}" ); // Should never happen.
238238 }
239239
240240 public static function compareOp( $a, $b, $op ) {
241 - if( $op == '==' || $op == '=' )
 241+ if ( $op == '==' || $op == '=' )
242242 return new AFPData( self::DBool, self::equals( $a, $b ) );
243 - if( $op == '!=' )
 243+ if ( $op == '!=' )
244244 return new AFPData( self::DBool, !self::equals( $a, $b ) );
245 - if( $op == '===' )
 245+ if ( $op == '===' )
246246 return new AFPData( self::DBool, $a->type == $b->type && self::equals( $a, $b ) );
247 - if( $op == '!==' )
 247+ if ( $op == '!==' )
248248 return new AFPData( self::DBool, $a->type != $b->type || !self::equals( $a, $b ) );
249249 $a = $a->toString();
250250 $b = $b->toString();
251 - if( $op == '>' )
 251+ if ( $op == '>' )
252252 return new AFPData( self::DBool, $a > $b );
253 - if( $op == '<' )
 253+ if ( $op == '<' )
254254 return new AFPData( self::DBool, $a < $b );
255 - if( $op == '>=' )
 255+ if ( $op == '>=' )
256256 return new AFPData( self::DBool, $a >= $b );
257 - if( $op == '<=' )
 257+ if ( $op == '<=' )
258258 return new AFPData( self::DBool, $a <= $b );
259259 throw new AFPException( "Invalid comparison operation: {$op}" ); // Should never happen
260260 }
261261
262 - public static function mulRel( $a, $b, $op, $pos ) {
 262+ public static function mulRel( $a, $b, $op, $pos ) {
263263 // Figure out the type.
264264 if ( $a->type == self::DFloat || $b->type == self::DFloat ||
265265 $a->toFloat() != $a->toString() || $b->toFloat() != $b->toString() ) {
@@ -276,11 +276,11 @@
277277 }
278278
279279 $data = null;
280 - if( $op == '*' )
 280+ if ( $op == '*' )
281281 $data = $a * $b;
282 - elseif( $op == '/' )
 282+ elseif ( $op == '/' )
283283 $data = $a / $b;
284 - elseif( $op == '%' )
 284+ elseif ( $op == '%' )
285285 $data = $a % $b;
286286 else
287287 throw new AFPException( "Invalid multiplication-related operation: {$op}" ); // Should never happen
@@ -294,9 +294,9 @@
295295 }
296296
297297 public static function sum( $a, $b ) {
298 - if( $a->type == self::DString || $b->type == self::DString )
 298+ if ( $a->type == self::DString || $b->type == self::DString )
299299 return new AFPData( self::DString, $a->toString() . $b->toString() );
300 - elseif( $a->type == self::DList && $b->type == self::DList )
 300+ elseif ( $a->type == self::DList && $b->type == self::DList )
301301 return new AFPData( self::DList, array_merge( $a->toList(), $b->toList() ) );
302302 else
303303 return new AFPData( self::DFloat, $a->toFloat() + $b->toFloat() );
@@ -318,7 +318,7 @@
319319 public function toFloat() {
320320 return self::castTypes( $this, self::DFloat )->data;
321321 }
322 -
 322+
323323 public function toInt() {
324324 return self::castTypes( $this, self::DInt )->data;
325325 }
@@ -338,7 +338,7 @@
339339 }
340340 }
341341
342 -class AFPException extends MWException {}
 342+class AFPException extends MWException { }
343343
344344 // Exceptions that we might conceivably want to report to ordinary users
345345 // (i.e. exceptions that don't represent bugs in the extension itself)
@@ -397,7 +397,7 @@
398398 '&', '|', '^', // Logic
399399 ':=', // Setting
400400 '?', ':', // Ternery
401 - '<=','<', // Less than
 401+ '<=', '<', // Less than
402402 '>=', '>', // Greater than
403403 '===', '==', '=', // Equality
404404 );
@@ -446,7 +446,7 @@
447447
448448 public function setVars( $vars ) {
449449 if ( is_array( $vars ) ) {
450 - foreach( $vars as $name => $var ) {
 450+ foreach ( $vars as $name => $var ) {
451451 $this->setVar( $name, $var );
452452 }
453453 } elseif ( $vars instanceof AbuseFilterVariableHolder ) {
@@ -477,24 +477,24 @@
478478 }
479479
480480 protected function skipOverBraces() {
481 - if( !( $this->mCur->type == AFPToken::TBrace && $this->mCur->value == '(' ) || !$this->mShortCircuit ) {
 481+ if ( !( $this->mCur->type == AFPToken::TBrace && $this->mCur->value == '(' ) || !$this->mShortCircuit ) {
482482 return;
483483 }
484484
485485 $braces = 1;
486486 wfProfileIn( __METHOD__ );
487 - while( $this->mCur->type != AFPToken::TNone && $braces > 0 ) {
 487+ while ( $this->mCur->type != AFPToken::TNone && $braces > 0 ) {
488488 $this->move();
489 - if( $this->mCur->type == AFPToken::TBrace ) {
490 - if( $this->mCur->value == '(' ) {
 489+ if ( $this->mCur->type == AFPToken::TBrace ) {
 490+ if ( $this->mCur->value == '(' ) {
491491 $braces++;
492 - } elseif( $this->mCur->value == ')' ) {
 492+ } elseif ( $this->mCur->value == ')' ) {
493493 $braces--;
494494 }
495495 }
496496 }
497497 wfProfileOut( __METHOD__ );
498 - if( !( $this->mCur->type == AFPToken::TBrace && $this->mCur->value == ')' ) )
 498+ if ( !( $this->mCur->type == AFPToken::TBrace && $this->mCur->value == ')' ) )
499499 throw new AFPUserVisibleException( 'expectednotfound', $this->mCur->pos, array( ')' ) );
500500 }
501501
@@ -523,7 +523,7 @@
524524 return 0;
525525 }
526526
527 - return ( strlen( $a ) < strlen( $b ) ) ? -1 : 1;
 527+ return ( strlen( $a ) < strlen( $b ) ) ? - 1 : 1;
528528 }
529529
530530 /* Levels */
@@ -532,45 +532,45 @@
533533 protected function doLevelEntry( &$result ) {
534534 $this->doLevelSemicolon( $result );
535535
536 - if( $this->mCur->type != AFPToken::TNone ) {
 536+ if ( $this->mCur->type != AFPToken::TNone ) {
537537 throw new AFPUserVisibleException( 'unexpectedatend', $this->mCur->pos, array( $this->mCur->type ) );
538538 }
539539 }
540 -
 540+
541541 /** Handles multiple expressions */
542542 protected function doLevelSemicolon( &$result ) {
543543 do {
544544 $this->move();
545 - if( $this->mCur->type != AFPToken::TStatementSeparator )
 545+ if ( $this->mCur->type != AFPToken::TStatementSeparator )
546546 $this->doLevelSet( $result );
547 - } while( $this->mCur->type == AFPToken::TStatementSeparator );
 547+ } while ( $this->mCur->type == AFPToken::TStatementSeparator );
548548 }
549549
550550 /** Handles multiple expressions */
551551 protected function doLevelSet( &$result ) {
552 - if( $this->mCur->type == AFPToken::TID ) {
 552+ if ( $this->mCur->type == AFPToken::TID ) {
553553 $varname = $this->mCur->value;
554554 $prev = $this->getState();
555555 $this->move();
556556
557 - if( $this->mCur->type == AFPToken::TOp && $this->mCur->value == ':=' ) {
 557+ if ( $this->mCur->type == AFPToken::TOp && $this->mCur->value == ':=' ) {
558558 $this->move();
559559 $this->doLevelSet( $result );
560560 $this->setUserVariable( $varname, $result );
561561 return;
562 - } elseif( $this->mCur->type == AFPToken::TSquareBracket && $this->mCur->value == '[' ) {
563 - if( !$this->mVars->varIsSet( $varname ) ) {
 562+ } elseif ( $this->mCur->type == AFPToken::TSquareBracket && $this->mCur->value == '[' ) {
 563+ if ( !$this->mVars->varIsSet( $varname ) ) {
564564 throw new AFPUserVisibleException( 'unrecognisedvar',
565565 $this->mCur->pos,
566566 array( $var )
567567 );
568568 }
569569 $list = $this->mVars->getVar( $varname );
570 - if( $list->type != AFPData::DList )
 570+ if ( $list->type != AFPData::DList )
571571 throw new AFPUserVisibleException( 'notlist', $this->mCur->pos, array() );
572572 $list = $list->toList();
573573 $this->move();
574 - if( $this->mCur->type == AFPToken::TSquareBracket && $this->mCur->value == ']' ) {
 574+ if ( $this->mCur->type == AFPToken::TSquareBracket && $this->mCur->value == ']' ) {
575575 $idx = 'new';
576576 } else {
577577 $this->setState( $prev );
@@ -578,19 +578,19 @@
579579 $idx = new AFPData();
580580 $this->doLevelSemicolon( $idx );
581581 $idx = $idx->toInt();
582 - if( !( $this->mCur->type == AFPToken::TSquareBracket && $this->mCur->value == ']' ) )
583 - throw new AFPUserVisibleException( 'expectednotfound', $this->mCur->pos,
584 - array(']', $this->mCur->type, $this->mCur->value ) );
585 - if( count( $list ) <= $idx ) {
 582+ if ( !( $this->mCur->type == AFPToken::TSquareBracket && $this->mCur->value == ']' ) )
 583+ throw new AFPUserVisibleException( 'expectednotfound', $this->mCur->pos,
 584+ array( ']', $this->mCur->type, $this->mCur->value ) );
 585+ if ( count( $list ) <= $idx ) {
586586 throw new AFPUserVisibleException( 'outofbounds', $this->mCur->pos,
587587 array( $idx, count( $result->data ) ) );
588588 }
589589 }
590590 $this->move();
591 - if( $this->mCur->type == AFPToken::TOp && $this->mCur->value == ':=' ) {
 591+ if ( $this->mCur->type == AFPToken::TOp && $this->mCur->value == ':=' ) {
592592 $this->move();
593593 $this->doLevelSet( $result );
594 - if( $idx === 'new' )
 594+ if ( $idx === 'new' )
595595 $list[] = $result;
596596 else
597597 $list[$idx] = $result;
@@ -607,11 +607,11 @@
608608 }
609609
610610 protected function doLevelConditions( &$result ) {
611 - if( $this->mCur->type == AFPToken::TKeyword && $this->mCur->value == 'if' ) {
 611+ if ( $this->mCur->type == AFPToken::TKeyword && $this->mCur->value == 'if' ) {
612612 $this->move();
613613 $this->doLevelBoolOps( $result );
614614
615 - if( !( $this->mCur->type == AFPToken::TKeyword && $this->mCur->value == 'then' ) )
 615+ if ( !( $this->mCur->type == AFPToken::TKeyword && $this->mCur->value == 'then' ) )
616616 throw new AFPUserVisibleException( 'expectednotfound',
617617 $this->mCur->pos,
618618 array(
@@ -636,7 +636,7 @@
637637 $this->mShortCircuit = $scOrig;
638638 }
639639
640 - if( !( $this->mCur->type == AFPToken::TKeyword && $this->mCur->value == 'else' ) )
 640+ if ( !( $this->mCur->type == AFPToken::TKeyword && $this->mCur->value == 'else' ) )
641641 throw new AFPUserVisibleException( 'expectednotfound',
642642 $this->mCur->pos,
643643 array(
@@ -656,7 +656,7 @@
657657 $this->mShortCircuit = $scOrig;
658658 }
659659
660 - if( !( $this->mCur->type == AFPToken::TKeyword && $this->mCur->value == 'end' ) )
 660+ if ( !( $this->mCur->type == AFPToken::TKeyword && $this->mCur->value == 'end' ) )
661661 throw new AFPUserVisibleException( 'expectednotfound',
662662 $this->mCur->pos,
663663 array(
@@ -667,7 +667,7 @@
668668 );
669669 $this->move();
670670
671 - if( $result->toBool() ) {
 671+ if ( $result->toBool() ) {
672672 $result = $r1;
673673 } else {
674674 $result = $r2;
@@ -675,7 +675,7 @@
676676
677677 } else {
678678 $this->doLevelBoolOps( $result );
679 - if( $this->mCur->type == AFPToken::TOp && $this->mCur->value == '?' ) {
 679+ if ( $this->mCur->type == AFPToken::TOp && $this->mCur->value == '?' ) {
680680 $this->move();
681681 $r1 = new AFPData();
682682 $r2 = new AFPData();
@@ -691,7 +691,7 @@
692692 $this->mShortCircuit = $scOrig;
693693 }
694694
695 - if( !( $this->mCur->type == AFPToken::TOp && $this->mCur->value == ':' ) )
 695+ if ( !( $this->mCur->type == AFPToken::TOp && $this->mCur->value == ':' ) )
696696 throw new AFPUserVisibleException( 'expectednotfound',
697697 $this->mCur->pos,
698698 array(
@@ -711,7 +711,7 @@
712712 $this->mShortCircuit = $scOrig;
713713 }
714714
715 - if( $isTrue ) {
 715+ if ( $isTrue ) {
716716 $result = $r1;
717717 } else {
718718 $result = $r2;
@@ -723,7 +723,7 @@
724724 protected function doLevelBoolOps( &$result ) {
725725 $this->doLevelCompares( $result );
726726 $ops = array( '&', '|', '^' );
727 - while( $this->mCur->type == AFPToken::TOp && in_array( $this->mCur->value, $ops ) ) {
 727+ while ( $this->mCur->type == AFPToken::TOp && in_array( $this->mCur->value, $ops ) ) {
728728 $op = $this->mCur->value;
729729 $this->move();
730730 $r2 = new AFPData();
@@ -762,7 +762,7 @@
763763 AbuseFilter::triggerLimiter();
764764 $this->doLevelSumRels( $result );
765765 $ops = array( '==', '===', '!=', '!==', '<', '>', '<=', '>=', '=' );
766 - while( $this->mCur->type == AFPToken::TOp && in_array( $this->mCur->value, $ops ) ) {
 766+ while ( $this->mCur->type == AFPToken::TOp && in_array( $this->mCur->value, $ops ) ) {
767767 $op = $this->mCur->value;
768768 $this->move();
769769 $r2 = new AFPData();
@@ -777,14 +777,14 @@
778778 $this->doLevelMulRels( $result );
779779 wfProfileIn( __METHOD__ );
780780 $ops = array( '+', '-' );
781 - while( $this->mCur->type == AFPToken::TOp && in_array( $this->mCur->value, $ops ) ) {
 781+ while ( $this->mCur->type == AFPToken::TOp && in_array( $this->mCur->value, $ops ) ) {
782782 $op = $this->mCur->value;
783783 $this->move();
784784 $r2 = new AFPData();
785785 $this->doLevelMulRels( $r2 );
786 - if( $op == '+' )
 786+ if ( $op == '+' )
787787 $result = AFPData::sum( $result, $r2 );
788 - if( $op == '-' )
 788+ if ( $op == '-' )
789789 $result = AFPData::sub( $result, $r2 );
790790 }
791791 wfProfileOut( __METHOD__ );
@@ -794,7 +794,7 @@
795795 $this->doLevelPow( $result );
796796 wfProfileIn( __METHOD__ );
797797 $ops = array( '*', '/', '%' );
798 - while( $this->mCur->type == AFPToken::TOp && in_array( $this->mCur->value, $ops ) ) {
 798+ while ( $this->mCur->type == AFPToken::TOp && in_array( $this->mCur->value, $ops ) ) {
799799 $op = $this->mCur->value;
800800 $this->move();
801801 $r2 = new AFPData();
@@ -807,7 +807,7 @@
808808 protected function doLevelPow( &$result ) {
809809 $this->doLevelBoolInvert( $result );
810810 wfProfileIn( __METHOD__ );
811 - while( $this->mCur->type == AFPToken::TOp && $this->mCur->value == '**' ) {
 811+ while ( $this->mCur->type == AFPToken::TOp && $this->mCur->value == '**' ) {
812812 $this->move();
813813 $expanent = new AFPData();
814814 $this->doLevelBoolInvert( $expanent );
@@ -817,7 +817,7 @@
818818 }
819819
820820 protected function doLevelBoolInvert( &$result ) {
821 - if( $this->mCur->type == AFPToken::TOp && $this->mCur->value == '!' ) {
 821+ if ( $this->mCur->type == AFPToken::TOp && $this->mCur->value == '!' ) {
822822 $this->move();
823823 $this->doLevelSpecialWords( $result );
824824 wfProfileIn( __METHOD__ );
@@ -839,7 +839,7 @@
840840 'rlike' => 'keywordRegex',
841841 'regex' => 'keywordRegex'
842842 );
843 - if( $this->mCur->type == AFPToken::TKeyword && in_array( $keyword, array_keys( $specwords ) ) ) {
 843+ if ( $this->mCur->type == AFPToken::TKeyword && in_array( $keyword, array_keys( $specwords ) ) ) {
844844 $func = $specwords[$keyword];
845845 $this->move();
846846 $r2 = new AFPData();
@@ -860,11 +860,11 @@
861861
862862 protected function doLevelUnarys( &$result ) {
863863 $op = $this->mCur->value;
864 - if( $this->mCur->type == AFPToken::TOp && ( $op == "+" || $op == "-" ) ) {
 864+ if ( $this->mCur->type == AFPToken::TOp && ( $op == "+" || $op == "-" ) ) {
865865 $this->move();
866866 $this->doLevelListElements( $result );
867867 wfProfileIn( __METHOD__ );
868 - if( $op == '-' ) {
 868+ if ( $op == '-' ) {
869869 $result = AFPData::unaryMinus( $result );
870870 }
871871 wfProfileOut( __METHOD__ );
@@ -875,16 +875,16 @@
876876
877877 protected function doLevelListElements( &$result ) {
878878 $this->doLevelBraces( $result );
879 - while( $this->mCur->type == AFPToken::TSquareBracket && $this->mCur->value == '[' ) {
 879+ while ( $this->mCur->type == AFPToken::TSquareBracket && $this->mCur->value == '[' ) {
880880 $idx = new AFPData();
881881 $this->doLevelSemicolon( $idx );
882 - if( !( $this->mCur->type == AFPToken::TSquareBracket && $this->mCur->value == ']' ) ) {
 882+ if ( !( $this->mCur->type == AFPToken::TSquareBracket && $this->mCur->value == ']' ) ) {
883883 throw new AFPUserVisibleException( 'expectednotfound', $this->mCur->pos,
884 - array(']', $this->mCur->type, $this->mCur->value ) );
 884+ array( ']', $this->mCur->type, $this->mCur->value ) );
885885 }
886886 $idx = $idx->toInt();
887 - if( $result->type == AFPData::DList ) {
888 - if( count( $result->data ) <= $idx ) {
 887+ if ( $result->type == AFPData::DList ) {
 888+ if ( count( $result->data ) <= $idx ) {
889889 throw new AFPUserVisibleException( 'outofbounds', $this->mCur->pos,
890890 array( $idx, count( $result->data ) ) );
891891 }
@@ -897,16 +897,16 @@
898898 }
899899
900900 protected function doLevelBraces( &$result ) {
901 - if( $this->mCur->type == AFPToken::TBrace && $this->mCur->value == '(' ) {
902 - if( $this->mShortCircuit ) {
 901+ if ( $this->mCur->type == AFPToken::TBrace && $this->mCur->value == '(' ) {
 902+ if ( $this->mShortCircuit ) {
903903 $this->skipOverBraces();
904904 } else {
905905 $this->doLevelSemicolon( $result );
906906 }
907 - if( !( $this->mCur->type == AFPToken::TBrace && $this->mCur->value == ')' ) )
 907+ if ( !( $this->mCur->type == AFPToken::TBrace && $this->mCur->value == ')' ) )
908908 throw new AFPUserVisibleException( 'expectednotfound',
909909 $this->mCur->pos,
910 - array(')', $this->mCur->type, $this->mCur->value ) );
 910+ array( ')', $this->mCur->type, $this->mCur->value ) );
911911 $this->move();
912912 } else {
913913 $this->doLevelFunction( $result );
@@ -914,11 +914,11 @@
915915 }
916916
917917 protected function doLevelFunction( &$result ) {
918 - if( $this->mCur->type == AFPToken::TID && isset( self::$mFunctions[$this->mCur->value] ) ) {
 918+ if ( $this->mCur->type == AFPToken::TID && isset( self::$mFunctions[$this->mCur->value] ) ) {
919919 wfProfileIn( __METHOD__ );
920920 $func = self::$mFunctions[$this->mCur->value];
921921 $this->move();
922 - if( $this->mCur->type != AFPToken::TBrace || $this->mCur->value != '(' )
 922+ if ( $this->mCur->type != AFPToken::TBrace || $this->mCur->value != '(' )
923923 throw new AFPUserVisibleException( 'expectednotfound',
924924 $this->mCur->pos,
925925 array(
@@ -941,9 +941,9 @@
942942 $r = new AFPData();
943943 $this->doLevelSemicolon( $r );
944944 $args[] = $r;
945 - } while( $this->mCur->type == AFPToken::TComma );
 945+ } while ( $this->mCur->type == AFPToken::TComma );
946946
947 - if( $this->mCur->type != AFPToken::TBrace || $this->mCur->value != ')' ) {
 947+ if ( $this->mCur->type != AFPToken::TBrace || $this->mCur->value != ')' ) {
948948 throw new AFPUserVisibleException( 'expectednotfound',
949949 $this->mCur->pos,
950950 array(
@@ -1000,11 +1000,11 @@
10011001 $result = new AFPData( AFPData::DInt, $tok );
10021002 break;
10031003 case AFPToken::TKeyword:
1004 - if( $tok == "true" )
 1004+ if ( $tok == "true" )
10051005 $result = new AFPData( AFPData::DBool, true );
1006 - elseif( $tok == "false" )
 1006+ elseif ( $tok == "false" )
10071007 $result = new AFPData( AFPData::DBool, false );
1008 - elseif( $tok == "null" )
 1008+ elseif ( $tok == "null" )
10091009 $result = new AFPData();
10101010 else
10111011 throw new AFPUserVisibleException(
@@ -1016,24 +1016,24 @@
10171017 case AFPToken::TNone:
10181018 return; // Handled at entry level
10191019 case AFPToken::TBrace:
1020 - if( $this->mCur->value == ')' )
 1020+ if ( $this->mCur->value == ')' )
10211021 return; // Handled at the entry level
10221022 case AFPToken::TSquareBracket:
1023 - if( $this->mCur->value == '[' ) {
 1023+ if ( $this->mCur->value == '[' ) {
10241024 $list = array();
1025 - for(;;) {
 1025+ for ( ; ; ) {
10261026 $this->move();
1027 - if( $this->mCur->type == AFPToken::TSquareBracket && $this->mCur->value == ']' )
 1027+ if ( $this->mCur->type == AFPToken::TSquareBracket && $this->mCur->value == ']' )
10281028 break;
10291029 $item = new AFPData();
10301030 $this->doLevelSet( $item );
10311031 $list[] = $item;
1032 - if( $this->mCur->type == AFPToken::TSquareBracket && $this->mCur->value == ']' )
 1032+ if ( $this->mCur->type == AFPToken::TSquareBracket && $this->mCur->value == ']' )
10331033 break;
1034 - if( $this->mCur->type != AFPToken::TComma )
 1034+ if ( $this->mCur->type != AFPToken::TComma )
10351035 throw new AFPUserVisibleException( 'expectednotfound',
10361036 $this->mCur->pos,
1037 - array(', or ]', $this->mCur->type, $this->mCur->value ) );
 1037+ array( ', or ]', $this->mCur->type, $this->mCur->value ) );
10381038 }
10391039 $result = new AFPData( AFPData::DList, $list );
10401040 break;
@@ -1056,7 +1056,7 @@
10571057
10581058 protected function getVarValue( $var ) {
10591059 wfProfileIn( __METHOD__ );
1060 - $var = strtolower($var);
 1060+ $var = strtolower( $var );
10611061 $builderValues = AbuseFilter::getBuilderValues();
10621062 if ( !( array_key_exists( $var, $builderValues['vars'] )
10631063 || $this->mVars->varIsSet( $var ) ) ) {
@@ -1076,7 +1076,7 @@
10771077
10781078 protected function setUserVariable( $name, $value ) {
10791079 $builderValues = AbuseFilter::getBuilderValues();
1080 - if( array_key_exists( $name, $builderValues['vars'] ) )
 1080+ if ( array_key_exists( $name, $builderValues['vars'] ) )
10811081 throw new AFPUserVisibleException( 'overridebuiltin', $this->mCur->pos, array( $name ) );
10821082 $this->mVars->setVar( $name, $value );
10831083 }
@@ -1095,11 +1095,11 @@
10961096 // Spaces
10971097 $matches = array();
10981098 if ( preg_match( '/\s+/uA', $code, $matches, 0, $offset ) ) {
1099 - $offset += strlen( $matches[0] );
 1099+ $offset += strlen( $matches[0] );
11001100 }
1101 -
1102 - if( $offset >= strlen( $code ) ) return array( '', AFPToken::TNone, $code, $offset );
11031101
 1102+ if ( $offset >= strlen( $code ) ) return array( '', AFPToken::TNone, $code, $offset );
 1103+
11041104 // Comments
11051105 if ( substr( $code, $offset, 2 ) == '/*' ) {
11061106 $end = strpos( $code, '*/', $offset );
@@ -1108,17 +1108,17 @@
11091109 }
11101110
11111111 // Commas
1112 - if( $code[$offset] == ',' ) {
 1112+ if ( $code[$offset] == ',' ) {
11131113 return array( ',', AFPToken::TComma, $code, $offset + 1 );
11141114 }
11151115
11161116 // Braces
1117 - if( $code[$offset] == '(' or $code[$offset] == ')' ) {
 1117+ if ( $code[$offset] == '(' or $code[$offset] == ')' ) {
11181118 return array( $code[$offset], AFPToken::TBrace, $code, $offset + 1 );
11191119 }
11201120
11211121 // Square brackets
1122 - if( $code[$offset] == '[' or $code[$offset] == ']' ) {
 1122+ if ( $code[$offset] == '[' or $code[$offset] == ']' ) {
11231123 return array( $code[$offset], AFPToken::TSquareBracket, $code, $offset + 1 );
11241124 }
11251125
@@ -1128,13 +1128,13 @@
11291129 }
11301130
11311131 // Strings
1132 - if( $code[$offset] == '"' || $code[$offset] == "'" ) {
 1132+ if ( $code[$offset] == '"' || $code[$offset] == "'" ) {
11331133 $type = $code[$offset];
11341134 $offset++;
11351135 $strLen = strlen( $code );
1136 - while( $offset < $strLen ) {
 1136+ while ( $offset < $strLen ) {
11371137
1138 - if( $code[$offset] == $type ) {
 1138+ if ( $code[$offset] == $type ) {
11391139 $offset++;
11401140 return array( $tok, AFPToken::TString, $code, $offset );
11411141 }
@@ -1145,7 +1145,7 @@
11461146 if ( $addLength ) {
11471147 $tok .= substr( $code, $offset, $addLength );
11481148 $offset += $addLength;
1149 - } elseif( $code[$offset] == '\\' ) {
 1149+ } elseif ( $code[$offset] == '\\' ) {
11501150 switch( $code[$offset + 1] ) {
11511151 case '\\':
11521152 $tok .= '\\';
@@ -1177,14 +1177,14 @@
11781178 $tok .= "\\" . $code[$offset + 1];
11791179 }
11801180
1181 - $offset+=2;
 1181+ $offset += 2;
11821182
11831183 } else {
11841184 $tok .= $code[$offset];
11851185 $offset++;
11861186 }
11871187 }
1188 - throw new AFPUserVisibleException( 'unclosedstring', $offset, array() );;
 1188+ throw new AFPUserVisibleException( 'unclosedstring', $offset, array() ); ;
11891189 }
11901190
11911191 // Find operators
@@ -1194,7 +1194,7 @@
11951195 if ( !$operator_regex ) {
11961196 $quoted_operators = array();
11971197
1198 - foreach( self::$mOps as $op )
 1198+ foreach ( self::$mOps as $op )
11991199 $quoted_operators[] = preg_quote( $op, '/' );
12001200 $operator_regex = '/(' . implode( '|', $quoted_operators ) . ')/A';
12011201 }
@@ -1203,7 +1203,7 @@
12041204
12051205 preg_match( $operator_regex, $code, $matches, 0, $offset );
12061206
1207 - if( count( $matches ) ) {
 1207+ if ( count( $matches ) ) {
12081208 $tok = $matches[0];
12091209 $offset += strlen( $tok );
12101210 return array( $tok, AFPToken::TOp, $code, $offset );
@@ -1232,9 +1232,9 @@
12331233 // Sometimes the base char gets mixed in with the rest of it because
12341234 // the regex targets hex, too.
12351235 // This mostly happens with binary
1236 - if ( !$baseChar && !empty( $bases[ substr( $input, -1 ) ] ) ) {
1237 - $baseChar = substr( $input, -1, 1 );
1238 - $input = substr( $input, 0, -1 );
 1236+ if ( !$baseChar && !empty( $bases[ substr( $input, - 1 ) ] ) ) {
 1237+ $baseChar = substr( $input, - 1, 1 );
 1238+ $input = substr( $input, 0, - 1 );
12391239 }
12401240
12411241 if ( $baseChar ) {
@@ -1293,7 +1293,7 @@
12941294 // Built-in functions
12951295 protected function funcLc( $args ) {
12961296 global $wgContLang;
1297 - if( count( $args ) < 1 )
 1297+ if ( count( $args ) < 1 )
12981298 throw new AFPUserVisibleException( 'notenoughargs', $this->mCur->pos,
12991299 array( 'lc', 2, count( $args ) ) );
13001300 $s = $args[0]->toString();
@@ -1301,7 +1301,7 @@
13021302 }
13031303
13041304 protected function funcLen( $args ) {
1305 - if( count( $args ) < 1 )
 1305+ if ( count( $args ) < 1 )
13061306 throw new AFPUserVisibleException( 'notenoughargs', $this->mCur->pos,
13071307 array( 'len', 2, count( $args ) ) );
13081308
@@ -1310,7 +1310,7 @@
13111311 }
13121312
13131313 protected function funcSimpleNorm( $args ) {
1314 - if( count( $args ) < 1 )
 1314+ if ( count( $args ) < 1 )
13151315 throw new AFPUserVisibleException( 'notenoughargs', $this->mCur->pos,
13161316 array( 'simplenorm', 2, count( $args ) ) );
13171317 $s = $args[0]->toString();
@@ -1321,7 +1321,7 @@
13221322 }
13231323
13241324 protected function funcSpecialRatio( $args ) {
1325 - if( count( $args ) < 1 )
 1325+ if ( count( $args ) < 1 )
13261326 throw new AFPUserVisibleException( 'notenoughargs', $this->mCur->pos,
13271327 array( 'specialratio', 1, count( $args ) ) );
13281328 $s = $args[0]->toString();
@@ -1338,17 +1338,17 @@
13391339 }
13401340
13411341 protected function funcCount( $args ) {
1342 - if( count( $args ) < 1 )
 1342+ if ( count( $args ) < 1 )
13431343 throw new AFPUserVisibleException( 'notenoughargs', $this->mCur->pos,
13441344 array( 'count', 1, count( $args ) ) );
13451345
1346 - if( $args[0]->type == AFPData::DList && count( $args ) == 1 ) {
 1346+ if ( $args[0]->type == AFPData::DList && count( $args ) == 1 ) {
13471347 return new AFPData( AFPData::DInt, count( $args[0]->data ) );
13481348 }
13491349
1350 - $offset = -1;
 1350+ $offset = - 1;
13511351
1352 - if ( count( $args ) == 1) {
 1352+ if ( count( $args ) == 1 ) {
13531353 $count = count( explode( ",", $args[0]->toString() ) );
13541354 } else {
13551355 $needle = $args[0]->toString();
@@ -1364,20 +1364,20 @@
13651365 }
13661366
13671367 protected function funcRCount( $args ) {
1368 - if( count( $args ) < 1 )
 1368+ if ( count( $args ) < 1 )
13691369 throw new AFPUserVisibleException( 'notenoughargs', $this->mCur->pos,
13701370 array( 'rcount', 1, count( $args ) ) );
13711371
1372 - $offset = -1;
 1372+ $offset = - 1;
13731373
1374 - if ( count( $args ) == 1) {
 1374+ if ( count( $args ) == 1 ) {
13751375 $count = count( explode( ",", $args[0]->toString() ) );
13761376 } else {
13771377 $needle = $regex = $args[0]->toString();
13781378 $haystack = $args[1]->toString();
13791379 $pos = $this->mCur->pos;
13801380
1381 - ## Munge the regex
 1381+ # # Munge the regex
13821382 $needle = preg_replace( '!(\\\\\\\\)*(\\\\)?/!', '$1\/', $needle );
13831383 $needle = "/$needle/u";
13841384
@@ -1388,7 +1388,7 @@
13891389 set_error_handler( array( 'AbuseFilterParser', 'regexErrorHandler' ) );
13901390 $count = preg_match_all( $needle, $haystack, $matches );
13911391 restore_error_handler();
1392 - } catch( Exception $e ) {
 1392+ } catch ( Exception $e ) {
13931393 restore_error_handler();
13941394 throw $e;
13951395 }
@@ -1398,7 +1398,7 @@
13991399 }
14001400
14011401 protected function funcIPInRange( $args ) {
1402 - if( count( $args ) < 2 )
 1402+ if ( count( $args ) < 2 )
14031403 throw new AFPUserVisibleException( 'notenoughargs', $this->mCur->pos,
14041404 array( 'ip_in_range', 2, count( $args ) ) );
14051405
@@ -1411,7 +1411,7 @@
14121412 }
14131413
14141414 protected function funcCCNorm( $args ) {
1415 - if( count( $args ) < 1 )
 1415+ if ( count( $args ) < 1 )
14161416 throw new AFPUserVisibleException( 'notenoughargs', $this->mCur->pos,
14171417 array( 'ccnorm', 1, count( $args ) ) );
14181418 $s = $args[0]->toString();
@@ -1433,7 +1433,7 @@
14341434
14351435 $searchStrings = array();
14361436
1437 - foreach( $args as $arg ) {
 1437+ foreach ( $args as $arg ) {
14381438 $searchStrings[] = $arg->toString();
14391439 }
14401440
@@ -1444,8 +1444,8 @@
14451445 $ok = is_array( $result );
14461446 } else {
14471447 $ok = false;
1448 - foreach( $searchStrings as $needle ) {
1449 - if( in_string( $needle, $s ) ) {
 1448+ foreach ( $searchStrings as $needle ) {
 1449+ if ( in_string( $needle, $s ) ) {
14501450 $ok = true;
14511451 break;
14521452 }
@@ -1466,12 +1466,12 @@
14671467 }
14681468
14691469 return $replacementArray->replace( $s );
1470 - }
 1470+ }
14711471
14721472 protected function rmspecials( $s ) {
14731473 $orig = $s;
14741474 $s = preg_replace( '/[^\p{L}\p{N}]/u', '', $s );
1475 -
 1475+
14761476 return $s;
14771477 }
14781478
@@ -1484,18 +1484,18 @@
14851485 }
14861486
14871487 protected function funcRMSpecials( $args ) {
1488 - if( count( $args ) < 1 )
 1488+ if ( count( $args ) < 1 )
14891489 throw new AFPUserVisibleException( 'notenoughargs', $this->mCur->pos,
14901490 array( 'rmspecials', 1, count( $args ) ) );
14911491 $s = $args[0]->toString();
1492 -
 1492+
14931493 $s = $this->rmspecials( $s );
1494 -
 1494+
14951495 return new AFPData( AFPData::DString, $s );
14961496 }
1497 -
 1497+
14981498 protected function funcRMWhitespace( $args ) {
1499 - if( count( $args ) < 1 )
 1499+ if ( count( $args ) < 1 )
15001500 throw new AFPUserVisibleException( 'notenoughargs', $this->mCur->pos,
15011501 array( 'rmwhitespace', 1, count( $args ) ) );
15021502 $s = $args[0]->toString();
@@ -1506,7 +1506,7 @@
15071507 }
15081508
15091509 protected function funcRMDoubles( $args ) {
1510 - if( count( $args ) < 1 )
 1510+ if ( count( $args ) < 1 )
15111511 throw new AFPUserVisibleException( 'notenoughargs', $this->mCur->pos,
15121512 array( 'rmdoubles', 1, count( $args ) ) );
15131513 $s = $args[0]->toString();
@@ -1517,7 +1517,7 @@
15181518 }
15191519
15201520 protected function funcNorm( $args ) {
1521 - if( count( $args ) < 1 )
 1521+ if ( count( $args ) < 1 )
15221522 throw new AFPUserVisibleException( 'notenoughargs', $this->mCur->pos,
15231523 array( 'norm', 1, count( $args ) ) );
15241524 $s = $args[0]->toString();
@@ -1568,7 +1568,7 @@
15691569 }
15701570
15711571 if ( $result === false )
1572 - $result = -1;
 1572+ $result = - 1;
15731573
15741574 return new AFPData( AFPData::DInt, $result );
15751575 }
@@ -1641,10 +1641,10 @@
16421642 }
16431643 }
16441644
1645 - ## Taken from http://au2.php.net/manual/en/function.fnmatch.php#71725
1646 - ### Attribution: jk at ricochetsolutions dot com
 1645+ # Taken from http://au2.php.net/manual/en/function.fnmatch.php#71725
 1646+ # Attribution: jk at ricochetsolutions dot com
16471647
1648 -if( !function_exists( 'fnmatch' ) ) {
 1648+if ( !function_exists( 'fnmatch' ) ) {
16491649
16501650 function fnmatch( $pattern, $string ) {
16511651 return preg_match( "#^" . strtr( preg_quote( $pattern, '#' ), array( '\*' => '.*', '\?' => '.' ) ) . "$#iu", $string );
Index: trunk/extensions/AbuseFilter/SpecialAbuseLog.php
@@ -3,7 +3,6 @@
44 die();
55
66 class SpecialAbuseLog extends SpecialPage {
7 -
87 public function __construct() {
98 wfLoadExtensionMessages( 'AbuseFilter' );
109 parent::__construct( 'AbuseLog', 'abusefilter-log' );
@@ -24,11 +23,11 @@
2524 $wgOut->enableClientCache( false );
2625
2726 global $wgScriptPath;
28 - $wgOut->addExtensionStyle( $wgScriptPath .
 27+ $wgOut->addExtensionStyle( $wgScriptPath .
2928 "/extensions/AbuseFilter/abusefilter.css?$wgAbuseFilterStyleVersion" );
3029
3130 // Are we allowed?
32 - $errors = $this->getTitle()->getUserPermissionsErrors(
 31+ $errors = $this->getTitle()->getUserPermissionsErrors(
3332 'abusefilter-log', $wgUser, true, array( 'ns-specialprotected' ) );
3433 if ( count( $errors ) ) {
3534 // Go away.
@@ -74,20 +73,20 @@
7574 $fields = array();
7675
7776 // Search conditions
78 - $fields['abusefilter-log-search-user'] =
 77+ $fields['abusefilter-log-search-user'] =
7978 Xml::input( 'wpSearchUser', 45, $this->mSearchUser );
8079 if ( $this->canSeeDetails() ) {
81 - $fields['abusefilter-log-search-filter'] =
 80+ $fields['abusefilter-log-search-filter'] =
8281 Xml::input( 'wpSearchFilter', 45, $this->mSearchFilter );
8382 }
84 - $fields['abusefilter-log-search-title'] =
 83+ $fields['abusefilter-log-search-title'] =
8584 Xml::input( 'wpSearchTitle', 45, $this->mSearchTitle );
8685
8786 $form = Xml::hidden( 'title', $this->getTitle()->getPrefixedText() );
8887
8988 $form .= Xml::buildForm( $fields, 'abusefilter-log-search-submit' );
9089 $output .= Xml::tags( 'form',
91 - array( 'method' => 'GET', 'action' => $this->getTitle()->getLocalURL() ),
 90+ array( 'method' => 'GET', 'action' => $this->getTitle()->getLocalURL() ),
9291 $form );
9392 $output = Xml::tags( 'fieldset', null, $output );
9493
@@ -141,7 +140,7 @@
142141 $output .= Xml::element( 'legend', null, wfMsg( 'abusefilter-log-details-legend', $id ) );
143142 $output .= Xml::tags( 'p', null, $this->formatRow( $row, false ) );
144143
145 - // Load data
 144+ // Load data
146145 $vars = AbuseFilter::loadVarDump( $row->afl_var_dump );
147146
148147 // Diff, if available
@@ -228,7 +227,7 @@
229228 function formatRow( $row, $li = true ) {
230229 global $wgLang, $wgUser;
231230
232 - ## One-time setup
 231+ # # One-time setup
233232 static $sk = null;
234233
235234 if ( is_null( $sk ) ) {
@@ -263,7 +262,7 @@
264263 $actions = explode( ',', $actions_taken );
265264 $displayActions = array();
266265
267 - foreach( $actions as $action ) {
 266+ foreach ( $actions as $action ) {
268267 $displayActions[] = AbuseFilter::getActionDisplay( $action );
269268 }
270269 $actions_taken = implode( ', ', $displayActions );
@@ -283,9 +282,9 @@
284283 if ( $this->canSeeDetails() ) {
285284 $examineTitle = SpecialPage::getTitleFor( 'AbuseFilter', 'examine/log/' . $row->afl_id );
286285 $detailsLink = $sk->makeKnownLinkObj(
287 - $this->getTitle(),
288 - wfMsg( 'abusefilter-log-detailslink' ),
289 - 'details='.$row->afl_id
 286+ $this->getTitle(),
 287+ wfMsg( 'abusefilter-log-detailslink' ),
 288+ 'details=' . $row->afl_id
290289 );
291290 $examineLink = $sk->link(
292291 $examineTitle,
@@ -334,13 +333,12 @@
335334 $sk->link( $title ),
336335 $actions_taken,
337336 $parsed_comments
338 - )
 337+ )
339338 );
340339 }
341340
342341 return $li ? Xml::tags( 'li', null, $description ) : $description;
343342 }
344 -
345343 }
346344
347345 class AbuseLogPager extends ReverseChronologicalPager {
Index: trunk/extensions/AbuseFilter/install.php
@@ -1,5 +1,4 @@
22 <?php
3 -
43 /**
54 * Makes the required changes for the AbuseFilter extension
65 */
Index: trunk/extensions/AbuseFilter/SpecialAbuseFilter.php
@@ -3,7 +3,6 @@
44 die();
55
66 class SpecialAbuseFilter extends SpecialPage {
7 -
87 var $mSkin;
98
109 public function __construct() {
@@ -14,7 +13,7 @@
1514 public function execute( $subpage ) {
1615 global $wgUser, $wgOut, $wgRequest, $wgAbuseFilterStyleVersion, $wgScriptPath;
1716
18 - $wgOut->addExtensionStyle( "{$wgScriptPath}/extensions/AbuseFilter/abusefilter.css?" .
 17+ $wgOut->addExtensionStyle( "{$wgScriptPath}/extensions/AbuseFilter/abusefilter.css?" .
1918 $wgAbuseFilterStyleVersion );
2019 $view = 'AbuseFilterViewList';
2120
@@ -32,7 +31,7 @@
3332 if ( $wgRequest->getVal( 'result' ) == 'success' ) {
3433 $wgOut->setSubtitle( wfMsg( 'abusefilter-edit-done-subtitle' ) );
3534 $changedFilter = intval( $wgRequest->getVal( 'changedfilter' ) );
36 - $wgOut->wrapWikiMsg( '<p class="success">$1</p>',
 35+ $wgOut->wrapWikiMsg( '<p class="success">$1</p>',
3736 array( 'abusefilter-edit-done', $changedFilter ) );
3837 }
3938
@@ -43,7 +42,7 @@
4443 $params = explode( '/', $subpage );
4544
4645 // Filter by removing blanks.
47 - foreach( $params as $index => $param ) {
 46+ foreach ( $params as $index => $param ) {
4847 if ( $param === '' ) {
4948 unset( $params[$index] );
5049 }
@@ -77,7 +76,7 @@
7877 $view = 'AbuseFilterViewHistory';
7978 $pageType = 'recentchanges';
8079 } elseif ( count( $params ) == 2 ) {
81 - ## Second param is a filter ID
 80+ # # Second param is a filter ID
8281 $view = 'AbuseFilterViewHistory';
8382 $this->mFilter = $params[1];
8483 } elseif ( count( $params ) == 4 && $params[2] == 'item' ) {
Index: trunk/extensions/AbuseFilter/Views/AbuseFilterViewDiff.php
@@ -1,5 +1,4 @@
22 <?php
3 -
43 if ( !defined( 'MEDIAWIKI' ) )
54 die();
65
@@ -20,7 +19,7 @@
2120 $links['abusefilter-diff-backhistory'] = $this->getTitle( 'history/' . $this->mFilter );
2221 }
2322
24 - foreach( $links as $msg => $title ) {
 23+ foreach ( $links as $msg => $title ) {
2524 $links[$msg] = $this->mSkin->link( $title, wfMsgExt( $msg, 'parseinline' ) );
2625 }
2726
@@ -81,7 +80,7 @@
8281 } elseif ( $spec == 'prev' && !in_array( $otherSpec, $dependentSpecs ) ) {
8382 // cached
8483 $other = $this->loadSpec( $otherSpec, $spec );
85 -
 84+
8685 $row = $dbr->selectRow(
8786 'abuse_filter_history',
8887 '*',
@@ -116,7 +115,7 @@
117116 );
118117
119118 if ( $other && !$row ) {
120 - $t = $this->getTitle(
 119+ $t = $this->getTitle(
121120 'history/' . $this->mFilter . '/item/' . $other['meta']['history_id'] );
122121 global $wgOut;
123122 $wgOut->redirect( $t->getFullURL() );
@@ -152,6 +151,7 @@
153152
154153 function formatVersionLink( $timestamp, $history_id ) {
155154 global $wgLang, $wgUser;
 155+
156156 $sk = $wgUser->getSkin();
157157
158158 $filter = $this->mFilter;
@@ -261,7 +261,7 @@
262262 $lines = array();
263263
264264 ksort( $actions );
265 - foreach( $actions as $action => $parameters ) {
 265+ foreach ( $actions as $action => $parameters ) {
266266 $lines[] = AbuseFilter::formatAction( $action, $parameters );
267267 }
268268
@@ -279,7 +279,7 @@
280280 return $html;
281281 }
282282
283 - function getSimpleRow( $msg, $old, $new, $format='wikitext' ) {
 283+ function getSimpleRow( $msg, $old, $new, $format = 'wikitext' ) {
284284 $row = '';
285285
286286 $row .= Xml::tags( 'th', null, wfMsgExt( $msg, 'parseinline' ) );
Index: trunk/extensions/AbuseFilter/Views/AbuseFilterViewImport.php
@@ -1,5 +1,4 @@
22 <?php
3 -
43 class AbuseFilterViewImport extends AbuseFilterView {
54
65 function show() {
Index: trunk/extensions/AbuseFilter/Views/AbuseFilterViewList.php
@@ -1,5 +1,4 @@
22 <?php
3 -
43 if ( !defined( 'MEDIAWIKI' ) )
54 die();
65
@@ -28,10 +27,10 @@
2928 $deleted = $wgRequest->getVal( 'deletedfilters' );
3029 $hidedisabled = $wgRequest->getBool( 'hidedisabled' );
3130 if ( $deleted == 'show' ) {
32 - ## Nothing
 31+ # Nothing
3332 } elseif ( $deleted == 'only' ) {
3433 $conds['af_deleted'] = 1;
35 - } else { ## hide, or anything else.
 34+ } else { # hide, or anything else.
3635 $conds['af_deleted'] = 0;
3736 $deleted = 'hide';
3837 }
@@ -56,7 +55,7 @@
5756
5857 extract( $optarray );
5958
60 - ## Options form
 59+ # Options form
6160 $options = '';
6261 $fields = array();
6362 $fields['abusefilter-list-options-deleted'] =
@@ -74,7 +73,7 @@
7574 'mw-abusefilter-deletedfilters-hide',
7675 $deleted == 'hide'
7776 ) .
78 - Xml::radioLabel(
 77+ Xml::radioLabel(
7978 wfMsg( 'abusefilter-list-options-deleted-only' ),
8079 'deletedfilters',
8180 'only',
@@ -139,7 +138,6 @@
140139
141140 // Probably no need to autoload this class, as it will only be called from the class above.
142141 class AbuseFilterPager extends TablePager {
143 -
144142 function __construct( $page, $conds ) {
145143 $this->mPage = $page;
146144 $this->mConds = $conds;
@@ -191,7 +189,7 @@
192190 }
193191
194192 function formatValue( $name, $value ) {
195 - global $wgOut,$wgLang;
 193+ global $wgOut, $wgLang;
196194
197195 static $sk = null;
198196
@@ -204,18 +202,18 @@
205203
206204 switch( $name ) {
207205 case 'af_id':
208 - return $sk->link(
 206+ return $sk->link(
209207 SpecialPage::getTitleFor( 'AbuseFilter', intval( $value ) ), intval( $value ) );
210208 case 'af_public_comments':
211 - return $sk->link(
212 - SpecialPage::getTitleFor( 'AbuseFilter', intval( $row->af_id ) ),
213 - $wgOut->parseInline( $value )
 209+ return $sk->link(
 210+ SpecialPage::getTitleFor( 'AbuseFilter', intval( $row->af_id ) ),
 211+ $wgOut->parseInline( $value )
214212 );
215213 case 'af_actions':
216214 $actions = explode( ',', $value );
217215 $displayActions = array();
218 - foreach( $actions as $action ) {
219 - $displayActions[] = AbuseFilter::getActionDisplay( $action );;
 216+ foreach ( $actions as $action ) {
 217+ $displayActions[] = AbuseFilter::getActionDisplay( $action ); ;
220218 }
221219 return htmlspecialchars( implode( ', ', $displayActions ) );
222220 case 'af_enabled':
@@ -253,7 +251,7 @@
254252 $row->af_user,
255253 $row->af_user_text
256254 ) .
257 - $sk->userToolLinks(
 255+ $sk->userToolLinks(
258256 $row->af_user,
259257 $row->af_user_text
260258 );
@@ -265,7 +263,7 @@
266264 $userLink,
267265 $wgLang->date( $value, true ),
268266 $wgLang->time( $value, true ),
269 - $user )
 267+ $user )
270268 );
271269 default:
272270 throw new MWException( "Unknown row type $name!" );
Index: trunk/extensions/AbuseFilter/Views/AbuseFilterView.php
@@ -1,5 +1,4 @@
22 <?php
3 -
43 if ( !defined( 'MEDIAWIKI' ) )
54 die();
65
@@ -48,9 +47,9 @@
4948
5049 $s .= " ($examineLink)";
5150
52 - ## If we have a match..
 51+ # If we have a match..
5352 if ( isset( $rc->filterResult ) ) {
54 - $class = $rc->filterResult ?
 53+ $class = $rc->filterResult ?
5554 'mw-abusefilter-changeslist-match' :
5655 'mw-abusefilter-changeslist-nomatch';
5756
@@ -59,5 +58,5 @@
6059 }
6160
6261 // Kill rollback links.
63 - public function insertRollback( &$s, &$rc ) {}
 62+ public function insertRollback( &$s, &$rc ) { }
6463 }
Index: trunk/extensions/AbuseFilter/Views/AbuseFilterViewTools.php
@@ -1,11 +1,10 @@
22 <?php
3 -
43 if ( !defined( 'MEDIAWIKI' ) )
54 die();
65
76 class AbuseFilterViewTools extends AbuseFilterView {
87 function show() {
9 - global $wgRequest,$wgOut,$wgUser;
 8+ global $wgRequest, $wgOut, $wgUser;
109
1110 // Header
1211 $wgOut->setSubTitle( wfMsg( 'abusefilter-tools-subtitle' ) );
Index: trunk/extensions/AbuseFilter/Views/AbuseFilterViewHistory.php
@@ -1,10 +1,8 @@
22 <?php
3 -
43 if ( !defined( 'MEDIAWIKI' ) )
54 die();
65
76 class AbuseFilterViewHistory extends AbuseFilterView {
8 -
97 function __construct( $page, $params ) {
108 parent::__construct( $page, $params );
119 $this->mFilter = $page->mFilter;
@@ -20,7 +18,7 @@
2119 else
2220 $wgOut->setPageTitle( wfMsg( 'abusefilter-filter-log' ) );
2321
24 - ## Check perms
 22+ # Check perms
2523 if ( $filter &&
2624 !$wgUser->isAllowed( 'abusefilter-modify' ) &&
2725 AbuseFilter::filterHidden( $filter ) ) {
@@ -28,20 +26,20 @@
2927 return;
3028 }
3129
32 - ## Useful links
 30+ # Useful links
3331 $sk = $wgUser->getSkin();
3432 $links = array();
3533 if ( $filter )
3634 $links['abusefilter-history-backedit'] = $this->getTitle( $filter );
3735
38 - foreach( $links as $msg => $title ) {
 36+ foreach ( $links as $msg => $title ) {
3937 $links[$msg] = $sk->link( $title, wfMsgExt( $msg, 'parseinline' ) );
4038 }
4139
4240 $backlinks = $wgLang->pipeList( $links );
4341 $wgOut->addHTML( Xml::tags( 'p', null, $backlinks ) );
4442
45 - ## For user
 43+ # For user
4644 $user = $wgRequest->getText( 'user' );
4745 if ( $user ) {
4846 $wgOut->setSubtitle(
@@ -49,7 +47,7 @@
5048 'abusefilter-history-foruser',
5149 $sk->userLink( 1 /* We don't really need to get a user ID */, $user ),
5250 $user // For GENDER
53 - )
 51+ )
5452 );
5553 }
5654
@@ -76,7 +74,6 @@
7775 }
7876
7977 class AbuseFilterHistoryPager extends TablePager {
80 -
8178 function __construct( $filter, $page, $user ) {
8279 $this->mFilter = $filter;
8380 $this->mPage = $page;
@@ -92,7 +89,7 @@
9390 return $headers;
9491 }
9592
96 - $headers = array(
 93+ $headers = array(
9794 'afh_timestamp' => 'abusefilter-history-timestamp',
9895 'afh_user_text' => 'abusefilter-history-user',
9996 'afh_public_comments' => 'abusefilter-history-public',
@@ -128,7 +125,7 @@
129126
130127 switch( $name ) {
131128 case 'afh_timestamp':
132 - $title = SpecialPage::getTitleFor( 'AbuseFilter',
 129+ $title = SpecialPage::getTitleFor( 'AbuseFilter',
133130 'history/' . $row->afh_filter . '/item/' . $row->afh_id );
134131 $formatted = $sk->link( $title, $wgLang->timeanddate( $row->afh_timestamp, true ) );
135132 break;
@@ -148,7 +145,7 @@
149146
150147 $display_actions = '';
151148
152 - foreach( $actions as $action => $parameters ) {
 149+ foreach ( $actions as $action => $parameters ) {
153150 $displayAction = AbuseFilter::formatAction( $action, $parameters );
154151 $display_actions .= Xml::tags( 'li', null, $displayAction );
155152 }
@@ -161,7 +158,7 @@
162159 $formatted = $sk->link( $title, $value );
163160 break;
164161 case 'afh_id':
165 - $title = $this->mPage->getTitle(
 162+ $title = $this->mPage->getTitle(
166163 'history/' . $row->afh_filter . "/diff/prev/$value" );
167164 $formatted = $sk->link( $title, wfMsgExt( 'abusefilter-history-diff', 'parseinline' ) );
168165 break;
@@ -170,13 +167,13 @@
171168 break;
172169 }
173170
174 - $mappings = array_flip( AbuseFilter::$history_mappings ) +
 171+ $mappings = array_flip( AbuseFilter::$history_mappings ) +
175172 array( 'afh_actions' => 'actions', 'afh_id' => 'id' );
176173 $changed = explode( ',', $row->afh_changed_fields );
177174
178175 $fieldChanged = false;
179176 if ( $name == 'afh_flags' ) {
180 - // This is a bit freaky, but it works.
 177+ // This is a bit freaky, but it works.
181178 // Basically, returns true if any of those filters are in the $changed array.
182179 $filters = array( 'af_enabled', 'af_hidden', 'af_deleted', 'af_global' );
183180 if ( count( array_diff( $filters, $changed ) ) < count( $filters ) ) {
@@ -225,7 +222,7 @@
226223 );
227224
228225 global $wgRequest, $wgUser;
229 -
 226+
230227 if ( $this->mUser ) {
231228 $info['conds']['afh_user_text'] = $this->mUser;
232229 }
Index: trunk/extensions/AbuseFilter/Views/AbuseFilterViewTestBatch.php
@@ -1,5 +1,4 @@
22 <?php
3 -
43 if ( !defined( 'MEDIAWIKI' ) )
54 die();
65
@@ -24,14 +23,14 @@
2524
2625 $output = '';
2726 $output .= AbuseFilter::buildEditBox( $this->mFilter, 'wpTestFilter' ) . "\n";
28 - $output .=
 27+ $output .=
2928 Xml::inputLabel(
3029 wfMsg( 'abusefilter-test-load-filter' ),
3130 'wpInsertFilter',
3231 'mw-abusefilter-load-filter',
3332 10,
3433 ''
35 - ) .
 34+ ) .
3635 '&nbsp;' .
3736 Xml::element(
3837 'input',
@@ -39,7 +38,7 @@
4039 'type' => 'button',
4140 'value' => wfMsg( 'abusefilter-test-load' ),
4241 'id' => 'mw-abusefilter-load'
43 - )
 42+ )
4443 );
4544 $output = Xml::tags( 'div', array( 'id' => 'mw-abusefilter-test-editor' ), $output );
4645
@@ -48,9 +47,9 @@
4948 // Selectory stuff
5049 $selectFields = array();
5150 $selectFields['abusefilter-test-user'] = Xml::input( 'wpTestUser', 45, $this->mTestUser );
52 - $selectFields['abusefilter-test-period-start'] =
 51+ $selectFields['abusefilter-test-period-start'] =
5352 Xml::input( 'wpTestPeriodStart', 45, $this->mTestPeriodStart );
54 - $selectFields['abusefilter-test-period-end'] =
 53+ $selectFields['abusefilter-test-period-end'] =
5554 Xml::input( 'wpTestPeriodEnd', 45, $this->mTestPeriodEnd );
5655 $selectFields['abusefilter-test-page'] =
5756 Xml::input( 'wpTestPage', 45, $this->mTestPage );
@@ -59,10 +58,10 @@
6059
6160 $output .= Xml::hidden( 'title', $this->getTitle( 'test' )->getPrefixedText() );
6261 $output = Xml::tags( 'form',
63 - array(
64 - 'action' => $this->getTitle( 'test' )->getLocalURL(),
 62+ array(
 63+ 'action' => $this->getTitle( 'test' )->getLocalURL(),
6564 'method' => 'POST'
66 - ),
 65+ ),
6766 $output
6867 );
6968
@@ -108,7 +107,7 @@
109108 'recentchanges',
110109 '*',
111110 array_filter( $conds ),
112 - __METHOD__,
 111+ __METHOD__,
113112 array( 'LIMIT' => self::$mChangeLimit, 'ORDER BY' => 'rc_timestamp desc' )
114113 );
115114
@@ -153,8 +152,8 @@
154153 {
155154 $dbr = wfGetDB( DB_SLAVE );
156155 $this->mFilter = $dbr->selectField( 'abuse_filter',
157 - 'af_pattern',
158 - array( 'af_id' => $this->mParams[1] ),
 156+ 'af_pattern',
 157+ array( 'af_id' => $this->mParams[1] ),
159158 __METHOD__
160159 );
161160 }
@@ -162,13 +161,12 @@
163162 // Normalise username
164163 $userTitle = Title::newFromText( $testUsername );
165164
166 - if ( $userTitle && $userTitle->getNamespace() == NS_USER )
 165+ if ( $userTitle && $userTitle->getNamespace() == NS_USER )
167166 $this->mTestUser = $userTitle->getText(); // Allow User:Blah syntax.
168167 elseif ( $userTitle )
169168 // Not sure of the value of prefixedText over text, but no need to munge unnecessarily.
170169 $this->mTestUser = $userTitle->getPrefixedText();
171170 else
172171 $this->mTestUser = null; // No user specified.
173 -
174172 }
175173 }
Index: trunk/extensions/AbuseFilter/Views/AbuseFilterViewEdit.php
@@ -1,10 +1,8 @@
22 <?php
3 -
43 if ( !defined( 'MEDIAWIKI' ) )
54 die();
65
76 class AbuseFilterViewEdit extends AbuseFilterView {
8 -
97 function __construct( $page, $params ) {
108 parent::__construct( $page, $params );
119 $this->mFilter = $page->mFilter;
@@ -24,14 +22,14 @@
2523 }
2624
2725 $editToken = $wgRequest->getVal( 'wpEditToken' );
28 - $didEdit = $this->canEdit()
 26+ $didEdit = $this->canEdit()
2927 && $wgUser->matchEditToken( $editToken, array( 'abusefilter', $filter ) );
3028
3129 if ( $didEdit ) {
3230 // Check syntax
3331 $syntaxerr = AbuseFilter::checkSyntax( $wgRequest->getVal( 'wpFilterRules' ) );
3432 if ( $syntaxerr !== true ) {
35 - $wgOut->addHTML(
 33+ $wgOut->addHTML(
3634 $this->buildFilterEditor(
3735 wfMsgExt(
3836 'abusefilter-edit-badsyntax',
@@ -66,8 +64,8 @@
6765 global $wgAbuseFilterRestrictedActions;
6866 if (
6967 array_intersect(
70 - $wgAbuseFilterRestrictedActions,
71 - array_keys( array_filter( $actions ) ) )
 68+ $wgAbuseFilterRestrictedActions,
 69+ array_keys( array_filter( $actions ) ) )
7270 && !$wgUser->isAllowed( 'abusefilter-modify-restricted' ) )
7371 {
7472 $wgOut->addHTML(
@@ -83,7 +81,7 @@
8482 // If we've activated the 'tag' option, check the arguments for validity.
8583 if ( !empty( $actions['tag'] ) ) {
8684 $bad = false;
87 - foreach( $actions['tag']['parameters'] as $tag ) {
 85+ foreach ( $actions['tag']['parameters'] as $tag ) {
8886 $t = Title::makeTitleSafe( NS_MEDIAWIKI, 'tag-' . $tag );
8987 if ( !$t ) {
9088 $bad = true;
@@ -134,9 +132,9 @@
135133 global $wgAbuseFilterAvailableActions;
136134 $deadActions = array();
137135 $actionsRows = array();
138 - foreach( $wgAbuseFilterAvailableActions as $action ) {
 136+ foreach ( $wgAbuseFilterAvailableActions as $action ) {
139137 // Check if it's set
140 - $enabled = isset($actions[$action]) && (bool)$actions[$action];
 138+ $enabled = isset( $actions[$action] ) && (bool)$actions[$action];
141139
142140 if ( $enabled ) {
143141 $parameters = $actions[$action]['parameters'];
@@ -155,13 +153,13 @@
156154 // Create a history row
157155 $afh_row = array();
158156
159 - foreach( AbuseFilter::$history_mappings as $af_col => $afh_col ) {
 157+ foreach ( AbuseFilter::$history_mappings as $af_col => $afh_col ) {
160158 $afh_row[$afh_col] = $newRow[$af_col];
161159 }
162160
163161 // Actions
164162 $displayActions = array();
165 - foreach( $actions as $action ) {
 163+ foreach ( $actions as $action ) {
166164 $displayActions[$action['action']] = $action['parameters'];
167165 }
168166 $afh_row['afh_actions'] = serialize( $displayActions );
@@ -209,25 +207,25 @@
210208
211209 global $wgOut;
212210
213 - $wgOut->redirect(
 211+ $wgOut->redirect(
214212 $this->getTitle()->getLocalURL( 'result=success&changedfilter=' . $new_id ) );
215213 } else {
216214 if ( $history_id ) {
217 - $wgOut->addWikiMsg(
 215+ $wgOut->addWikiMsg(
218216 'abusefilter-edit-oldwarning', $this->mHistoryID, $this->mFilter );
219217 }
220218
221219 $wgOut->addHTML( $this->buildFilterEditor( null, $this->mFilter, $history_id ) );
222220
223221 if ( $history_id ) {
224 - $wgOut->addWikiMsg(
 222+ $wgOut->addWikiMsg(
225223 'abusefilter-edit-oldwarning', $this->mHistoryID, $this->mFilter );
226224 }
227225 }
228226 }
229227
230228 function buildFilterEditor( $error, $filter, $history_id = null ) {
231 - if( $filter === null ) {
 229+ if ( $filter === null ) {
232230 return false;
233231 }
234232
@@ -238,7 +236,7 @@
239237 // Load from request OR database.
240238 list( $row, $actions ) = $this->loadRequest( $filter, $history_id );
241239
242 - if( !$row ) {
 240+ if ( !$row ) {
243241 $wgOut->addWikiMsg( 'abusefilter-edit-badfilter' );
244242 $wgOut->addHTML( $sk->link( $this->getTitle(), wfMsg( 'abusefilter-return' ) ) );
245243 return;
@@ -269,7 +267,7 @@
270268
271269 $fields = array();
272270
273 - $fields['abusefilter-edit-id'] =
 271+ $fields['abusefilter-edit-id'] =
274272 $this->mFilter == 'new' ? wfMsg( 'abusefilter-edit-new' ) : $filter;
275273 $fields['abusefilter-edit-description'] =
276274 Xml::input(
@@ -280,7 +278,7 @@
281279 );
282280
283281 // Hit count display
284 - if( !empty( $row->af_hit_count ) ){
 282+ if ( !empty( $row->af_hit_count ) ) {
285283 $count = (int)$row->af_hit_count;
286284 $count_display = wfMsgExt( 'abusefilter-hitcount', array( 'parseinline' ),
287285 $wgLang->formatNum( $count )
@@ -303,7 +301,7 @@
304302 if ( $total > 0 ) {
305303 $matches_percent = sprintf( '%.2f', 100 * $matches_count / $total );
306304 list( $timeProfile, $condProfile ) = AbuseFilter::getFilterProfile( $filter );
307 -
 305+
308306 $fields['abusefilter-edit-status-label'] =
309307 wfMsgExt( 'abusefilter-edit-status', array( 'parsemag', 'escape' ),
310308 array(
@@ -347,7 +345,7 @@
348346 );
349347 }
350348
351 - foreach( $checkboxes as $checkboxId ) {
 349+ foreach ( $checkboxes as $checkboxId ) {
352350 $message = "abusefilter-edit-$checkboxId";
353351 $dbField = "af_$checkboxId";
354352 $postVar = 'wpFilter' . ucfirst( $checkboxId );
@@ -362,8 +360,10 @@
363361 $checkbox = Xml::tags( 'p', null, $checkbox );
364362 $flags .= $checkbox;
365363 }
 364+
366365 $fields['abusefilter-edit-flags'] = $flags;
367366 $tools = '';
 367+
368368 if ( $filter != 'new' && $wgUser->isAllowed( 'abusefilter-revert' ) ) {
369369 $tools .= Xml::tags(
370370 'p', null,
@@ -381,7 +381,7 @@
382382 $sk->link(
383383 $this->getTitle( "test/$filter" ),
384384 wfMsgExt( 'abusefilter-edit-test-link', 'parseinline' )
385 - )
 385+ )
386386 );
387387 // Last modification details
388388 $userLink =
@@ -397,7 +397,7 @@
398398 $wgLang->date( $row->af_timestamp, true ),
399399 $wgLang->time( $row->af_timestamp, true ),
400400 $user
401 - )
 401+ )
402402 );
403403 $history_display = wfMsgExt( 'abusefilter-edit-viewhistory', array( 'parseinline' ) );
404404 $fields['abusefilter-edit-history'] =
@@ -424,9 +424,9 @@
425425
426426 if ( $this->canEdit() ) {
427427 $form .= Xml::submitButton( wfMsg( 'abusefilter-edit-save' ) );
428 - $form .= Xml::hidden(
429 - 'wpEditToken',
430 - $wgUser->editToken( array( 'abusefilter', $filter ) )
 428+ $form .= Xml::hidden(
 429+ 'wpEditToken',
 430+ $wgUser->editToken( array( 'abusefilter', $filter ) )
431431 );
432432 }
433433
@@ -445,15 +445,16 @@
446446
447447 function buildConsequenceEditor( $row, $actions ) {
448448 global $wgAbuseFilterAvailableActions;
 449+
449450 $setActions = array();
450 - foreach( $wgAbuseFilterAvailableActions as $action ) {
 451+ foreach ( $wgAbuseFilterAvailableActions as $action ) {
451452 $setActions[$action] = array_key_exists( $action, $actions );
452453 }
453454
454455 $output = '';
455456
456 - foreach( $wgAbuseFilterAvailableActions as $action ) {
457 - $output .= $this->buildConsequenceSelector(
 457+ foreach ( $wgAbuseFilterAvailableActions as $action ) {
 458+ $output .= $this->buildConsequenceSelector(
458459 $action, $setActions[$action], @$actions[$action]['parameters'] );
459460 }
460461
@@ -508,7 +509,7 @@
509510 array(
510511 Xml::input( 'wpFilterThrottlePeriod', 20, $throttlePeriod,
511512 $readOnlyAttrib
512 - ) )
 513+ ) )
513514 );
514515 $throttleFields['abusefilter-edit-throttle-groups'] =
515516 Xml::textarea( 'wpFilterThrottleGroups', $throttleGroups . "\n",
@@ -521,28 +522,28 @@
522523 );
523524 return $throttleSettings;
524525 case 'flag':
525 - $checkbox = Xml::checkLabel(
526 - wfMsg( 'abusefilter-edit-action-flag' ),
527 - 'wpFilterActionFlag',
528 - "mw-abusefilter-action-checkbox-$action",
529 - true,
 526+ $checkbox = Xml::checkLabel(
 527+ wfMsg( 'abusefilter-edit-action-flag' ),
 528+ 'wpFilterActionFlag',
 529+ "mw-abusefilter-action-checkbox-$action",
 530+ true,
530531 array( 'disabled' => '1', 'class' => 'mw-abusefilter-action-checkbox' ) );
531532 return Xml::tags( 'p', null, $checkbox );
532533 case 'warn':
533534 $output = '';
534 - $checkbox = Xml::checkLabel(
535 - wfMsg( 'abusefilter-edit-action-warn' ),
536 - 'wpFilterActionWarn',
537 - "mw-abusefilter-action-checkbox-$action",
538 - $set,
 535+ $checkbox = Xml::checkLabel(
 536+ wfMsg( 'abusefilter-edit-action-warn' ),
 537+ 'wpFilterActionWarn',
 538+ "mw-abusefilter-action-checkbox-$action",
 539+ $set,
539540 array( 'class' => 'mw-abusefilter-action-checkbox' ) + $cbReadOnlyAttrib );
540541 $output .= Xml::tags( 'p', null, $checkbox );
541 - $warnMsg = empty($set) ? 'abusefilter-warning' : $parameters[0];
 542+ $warnMsg = empty( $set ) ? 'abusefilter-warning' : $parameters[0];
542543
543544 $warnFields['abusefilter-edit-warn-message'] =
544545 $this->getExistingSelector( $warnMsg );
545546 $warnFields['abusefilter-edit-warn-other-label'] =
546 - Xml::input(
 547+ Xml::input(
547548 'wpFilterWarnMessageOther',
548549 45,
549550 $warnMsg ? $warnMsg : 'abusefilter-warning-',
@@ -642,11 +643,11 @@
643644 $existingSelector->addOption( 'abusefilter-warning' );
644645
645646 global $wgLang;
646 - while( $row = $dbr->fetchObject( $res ) ) {
 647+ while ( $row = $dbr->fetchObject( $res ) ) {
647648 if ( $wgLang->lcfirst( $row->page_title ) == $wgLang->lcfirst( $warnMsg ) ) {
648649 $existingSelector->setDefault( $wgLang->lcfirst( $warnMsg ) );
649650 }
650 -
 651+
651652 if ( $row->page_title != 'Abusefilter-warning' ) {
652653 $existingSelector->addOption( $wgLang->lcfirst( $row->page_title ) );
653654 }
@@ -658,7 +659,6 @@
659660 }
660661
661662 function loadFilterData( $id ) {
662 -
663663 if ( $id == 'new' ) {
664664 $obj = new stdClass;
665665 $obj->af_pattern = '';
@@ -724,7 +724,7 @@
725725 if ( !is_null( $actions ) && !is_null( $row ) ) {
726726 return array( $row, $actions );
727727 } elseif ( $wgRequest->wasPosted() ) {
728 - ## Nothing, we do it all later
 728+ # Nothing, we do it all later
729729 } elseif ( $history_id ) {
730730 return $this->loadHistoryItem( $history_id );
731731 } else {
@@ -754,7 +754,7 @@
755755 'af_hidden',
756756 );
757757
758 - foreach( $copy as $name ) {
 758+ foreach ( $copy as $name ) {
759759 $row->$name = $importRow->$name;
760760 }
761761 } else {
@@ -764,7 +764,7 @@
765765 'af_comments' => 'wpFilterNotes'
766766 );
767767
768 - foreach( $textLoads as $col => $field ) {
 768+ foreach ( $textLoads as $col => $field ) {
769769 $row->$col = trim( $wgRequest->getVal( $field ) );
770770 }
771771
@@ -777,7 +777,7 @@
778778 // Actions
779779 global $wgAbuseFilterAvailableActions;
780780 $actions = array();
781 - foreach( $wgAbuseFilterAvailableActions as $action ) {
 781+ foreach ( $wgAbuseFilterAvailableActions as $action ) {
782782 // Check if it's set
783783 $enabled = $wgRequest->getBool( 'wpFilterAction' . ucfirst( $action ) );
784784
@@ -788,7 +788,7 @@
789789 // We need to load the parameters
790790 $throttleCount = $wgRequest->getIntOrNull( 'wpFilterThrottleCount' );
791791 $throttlePeriod = $wgRequest->getIntOrNull( 'wpFilterThrottlePeriod' );
792 - $throttleGroups = explode( "\n",
 792+ $throttleGroups = explode( "\n",
793793 trim( $wgRequest->getText( 'wpFilterThrottleGroups' ) ) );
794794
795795 $parameters[0] = $this->mFilter; // For now, anyway
@@ -804,7 +804,7 @@
805805 } elseif ( $action == 'tag' ) {
806806 $parameters = explode( "\n", $wgRequest->getText( 'wpFilterTags' ) );
807807 }
808 -
 808+
809809 $thisAction = array( 'action' => $action, 'parameters' => $parameters );
810810 $actions[$action] = $thisAction;
811811 }
Index: trunk/extensions/AbuseFilter/Views/AbuseFilterViewExamine.php
@@ -1,10 +1,8 @@
22 <?php
3 -
43 if ( !defined( 'MEDIAWIKI' ) )
54 die();
65
76 class AbuseFilterViewExamine extends AbuseFilterView {
8 -
97 function show() {
108 global $wgOut, $wgUser;
119
@@ -32,11 +30,11 @@
3331 // Add selector
3432 $selector = '';
3533
36 - $selectFields = array(); ## Same fields as in Test
 34+ $selectFields = array(); # # Same fields as in Test
3735 $selectFields['abusefilter-test-user'] = Xml::input( 'wpSearchUser', 45, $this->mSearchUser );
38 - $selectFields['abusefilter-test-period-start'] =
 36+ $selectFields['abusefilter-test-period-start'] =
3937 Xml::input( 'wpSearchPeriodStart', 45, $this->mSearchPeriodStart );
40 - $selectFields['abusefilter-test-period-end'] =
 38+ $selectFields['abusefilter-test-period-end'] =
4139 Xml::input( 'wpSearchPeriodEnd', 45, $this->mSearchPeriodEnd );
4240
4341 $selector .= Xml::buildForm( $selectFields, 'abusefilter-examine-submit' );
@@ -136,8 +134,8 @@
137135 $msg['nomatch'] = wfMsg( 'abusefilter-examine-nomatch' );
138136 $msg['syntaxerror'] = wfMsg( 'abusefilter-examine-syntaxerror' );
139137 $wgOut->addInlineScript(
140 - "var wgMessageMatch = " . Xml::encodeJsVar( $msg['match'] ) . ";\n".
141 - "var wgMessageNomatch = " . Xml::encodeJsVar( $msg['nomatch'] ) . ";\n".
 138+ "var wgMessageMatch = " . Xml::encodeJsVar( $msg['match'] ) . ";\n" .
 139+ "var wgMessageNomatch = " . Xml::encodeJsVar( $msg['nomatch'] ) . ";\n" .
142140 "var wgMessageError = " . Xml::encodeJsVar( $msg['syntaxerror'] ) . ";\n"
143141 );
144142
@@ -200,7 +198,7 @@
201199 // Normalise username
202200 $userTitle = Title::newFromText( $searchUsername );
203201
204 - if ( $userTitle && $userTitle->getNamespace() == NS_USER )
 202+ if ( $userTitle && $userTitle->getNamespace() == NS_USER )
205203 $this->mSearchUser = $userTitle->getText(); // Allow User:Blah syntax.
206204 elseif ( $userTitle )
207205 // Not sure of the value of prefixedText over text, but no need to munge unnecessarily.
@@ -246,7 +244,7 @@
247245 }
248246
249247 function formatRow( $row ) {
250 - ## Incompatible stuff.
 248+ # Incompatible stuff.
251249 $rc = RecentChange::newFromRow( $row );
252250 $rc->counter = $this->mPage->mCounter++;
253251 return $this->mChangesList->recentChangesLine( $rc, false );
Index: trunk/extensions/AbuseFilter/Views/AbuseFilterViewRevert.php
@@ -1,5 +1,4 @@
22 <?php
3 -
43 if ( !defined( 'MEDIAWIKI' ) )
54 die();
65
@@ -21,15 +20,15 @@
2221 return;
2322
2423 $wgOut->addWikiMsg( 'abusefilter-revert-intro', $filter );
25 - $wgOut->setPageTitle( wfMsg('abusefilter-revert-title', $filter) );
 24+ $wgOut->setPageTitle( wfMsg( 'abusefilter-revert-title', $filter ) );
2625
2726 // First, the search form.
2827 $searchFields = array();
29 - $searchFields['abusefilter-revert-filter'] =
 28+ $searchFields['abusefilter-revert-filter'] =
3029 Xml::element( 'strong', null, $filter );
31 - $searchFields['abusefilter-revert-periodstart'] =
 30+ $searchFields['abusefilter-revert-periodstart'] =
3231 Xml::input( 'wpPeriodStart', 45, $this->origPeriodStart );
33 - $searchFields['abusefilter-revert-periodend'] =
 32+ $searchFields['abusefilter-revert-periodend'] =
3433 Xml::input( 'wpPeriodEnd', 45, $this->origPeriodEnd );
3534 $searchForm = Xml::buildForm( $searchFields, 'abusefilter-revert-search' );
3635 $searchForm .= "\n" . Xml::hidden( 'submit', 1 );
@@ -55,12 +54,12 @@
5655 $results = $this->doLookup();
5756 $list = array();
5857
59 - foreach( $results as $result ) {
 58+ foreach ( $results as $result ) {
6059 $displayActions = array();
6160
6261 global $wgLang;
63 - $displayActions = array_map(
64 - array( 'AbuseFilter', 'getActionDisplay' ),
 62+ $displayActions = array_map(
 63+ array( 'AbuseFilter', 'getActionDisplay' ),
6564 $result['actions'] );
6665
6766 $msg = wfMsgExt(
@@ -76,7 +75,7 @@
7776 SpecialPage::getTitleFor( 'AbuseLog' ),
7877 wfMsgNoTrans( 'abusefilter-log-detailslink' ),
7978 array(),
80 - array( 'details' =>$result['id'] )
 79+ array( 'details' => $result['id'] )
8180 )
8281 )
8382 );
@@ -86,7 +85,7 @@
8786 $wgOut->addHTML( Xml::tags( 'ul', null, implode( "\n", $list ) ) );
8887
8988 // Add a button down the bottom.
90 - $confirmForm =
 89+ $confirmForm =
9190 Xml::hidden( 'editToken', $wgUser->editToken( "abusefilter-revert-$filter" ) ) .
9291 Xml::hidden( 'title', $this->getTitle( "revert/$filter" )->getPrefixedText() ) .
9392 Xml::hidden( 'wpPeriodStart', $this->origPeriodStart ) .
@@ -102,7 +101,7 @@
103102 array(
104103 'action' => $this->getTitle( "revert/$filter" )->getLocalURL(),
105104 'method' => 'post'
106 - ),
 105+ ),
107106 $confirmForm
108107 );
109108 $wgOut->addHTML( $confirmForm );
@@ -119,9 +118,9 @@
120119 $dbr = wfGetDB( DB_SLAVE );
121120
122121 if ( $periodStart )
123 - $conds[] = 'afl_timestamp>'.$dbr->addQuotes( $dbr->timestamp( $periodStart ) );
 122+ $conds[] = 'afl_timestamp>' . $dbr->addQuotes( $dbr->timestamp( $periodStart ) );
124123 if ( $periodEnd )
125 - $conds[] = 'afl_timestamp<'.$dbr->addQuotes( $dbr->timestamp( $periodEnd ) );
 124+ $conds[] = 'afl_timestamp<' . $dbr->addQuotes( $dbr->timestamp( $periodEnd ) );
126125
127126 // Database query.
128127 $res = $dbr->select( 'abuse_filter_log', '*', $conds, __METHOD__ );
@@ -171,9 +170,9 @@
172171 return false;
173172
174173 $results = $this->doLookup();
175 - foreach( $results as $result ) {
 174+ foreach ( $results as $result ) {
176175 $actions = $result['actions'];
177 - foreach( $actions as $action ) {
 176+ foreach ( $actions as $action ) {
178177 $this->revertAction( $action, $result );
179178 }
180179 }
@@ -201,7 +200,7 @@
202201 break;
203202 case 'blockautopromote':
204203 global $wgMemc;
205 - $wgMemc->delete( AbuseFilter::autopromoteBlockKey(
 204+ $wgMemc->delete( AbuseFilter::autopromoteBlockKey(
206205 User::newFromId( $result['userid'] ) ) );
207206 break;
208207 case 'degroup':
@@ -214,7 +213,7 @@
215214 );
216215
217216 $rows = array();
218 - foreach( $oldGroups as $group ) {
 217+ foreach ( $oldGroups as $group ) {
219218 $rows[] = array( 'ug_user' => $result['userid'], 'ug_group' => $group );
220219 }
221220
@@ -238,7 +237,7 @@
239238 $this->mPage->mFilter,
240239 $this->mReason
241240 ),
242 - array( implode( ',', $currentGroups ), implode( ',', $newGroups ) )
 241+ array( implode( ',', $currentGroups ), implode( ',', $newGroups ) )
243242 );
244243 }
245244 }
Index: trunk/extensions/AbuseFilter/ApiQueryAbuseFilters.php
@@ -1,5 +1,4 @@
22 <?php
3 -
43 /**
54 * Created on Mar 29, 2009
65 *
@@ -31,14 +30,13 @@
3231 * @ingroup Extensions
3332 */
3433 class ApiQueryAbuseFilters extends ApiQueryBase {
35 -
3634 public function __construct( $query, $moduleName ) {
3735 parent::__construct( $query, $moduleName, 'abf' );
3836 }
3937
4038 public function execute() {
4139 global $wgUser;
42 - if( !$wgUser->isAllowed( 'abusefilter-view' ) )
 40+ if ( !$wgUser->isAllowed( 'abusefilter-view' ) )
4341 $this->dieUsage( 'You don\'t have permission to view abuse filters', 'permissiondenied' );
4442
4543 $params = $this->extractRequestParams();
@@ -80,8 +78,8 @@
8179
8280 /* Check for conflicting parameters. */
8381 if ( ( isset( $show['enabled'] ) && isset( $show['!enabled'] ) )
84 - || ( isset( $show['deleted']) && isset( $show['!deleted'] ) )
85 - || ( isset( $show['private']) && isset( $show['!private'] ) ) ) {
 82+ || ( isset( $show['deleted'] ) && isset( $show['!deleted'] ) )
 83+ || ( isset( $show['private'] ) && isset( $show['!private'] ) ) ) {
8684 $this->dieUsage( 'Incorrect parameter - mutually exclusive values may not be supplied', 'show' );
8785 }
8886
@@ -98,40 +96,40 @@
9997 $showhidden = $wgUser->isAllowed( 'abusefilter-modify' );
10098
10199 $count = 0;
102 - while( $row = $res->fetchObject() ) {
103 - if( ++$count > $params['limit'] ) {
 100+ while ( $row = $res->fetchObject() ) {
 101+ if ( ++$count > $params['limit'] ) {
104102 // We've had enough
105103 $this->setContinueEnumParameter( 'startid', $row->af_id );
106104 break;
107105 }
108106 $entry = array();
109 - if( $fld_id )
110 - $entry['id'] = intval($row->af_id);
111 - if( $fld_desc )
 107+ if ( $fld_id )
 108+ $entry['id'] = intval( $row->af_id );
 109+ if ( $fld_desc )
112110 $entry['description'] = $row->af_public_comments;
113 - if( $fld_pattern && ( !$row->af_hidden || $showhidden ) )
 111+ if ( $fld_pattern && ( !$row->af_hidden || $showhidden ) )
114112 $entry['pattern'] = $row->af_pattern;
115 - if( $fld_actions )
 113+ if ( $fld_actions )
116114 $entry['actions'] = $row->af_actions;
117 - if( $fld_hits )
 115+ if ( $fld_hits )
118116 $entry['hits'] = intval( $row->af_hit_count );
119 - if( $fld_comments && ( !$row->af_hidden || $showhidden ) )
 117+ if ( $fld_comments && ( !$row->af_hidden || $showhidden ) )
120118 $entry['comments'] = $row->af_comments;
121 - if( $fld_user )
 119+ if ( $fld_user )
122120 $entry['lasteditor'] = $row->af_user_text;
123 - if( $fld_time )
 121+ if ( $fld_time )
124122 $entry['lastedittime'] = wfTimestamp( TS_ISO_8601, $row->af_timestamp );
125 - if( $fld_private && $row->af_hidden )
 123+ if ( $fld_private && $row->af_hidden )
126124 $entry['private'] = '';
127 - if( $fld_status ) {
128 - if( $row->af_enabled )
 125+ if ( $fld_status ) {
 126+ if ( $row->af_enabled )
129127 $entry['enabled'] = '';
130 - if( $row->af_deleted )
 128+ if ( $row->af_deleted )
131129 $entry['deleted'] = '';
132130 }
133131 if ( $entry ) {
134132 $fit = $result->addValue( array( 'query', $this->getModuleName() ), null, $entry );
135 - if( !$fit ) {
 133+ if ( !$fit ) {
136134 $this->setContinueEnumParameter( 'startid', $row->af_id );
137135 break;
138136 }
Index: trunk/extensions/AbuseFilter/AbuseFilter.class.php
@@ -3,7 +3,6 @@
44 die();
55
66 class AbuseFilter {
7 -
87 public static $statsStoragePeriod = 86400;
98 public static $tokenCache = array();
109 public static $modifyCache = array();
@@ -141,7 +140,7 @@
142141
143142 $links = array();
144143
145 - foreach( $linkDefs as $name => $page ) {
 144+ foreach ( $linkDefs as $name => $page ) {
146145 $msgName = "abusefilter-topnav-$name";
147146
148147 if ( isset( $msgOverrides[$name] ) )
@@ -285,7 +284,7 @@
286285
287286 // Use restrictions.
288287 global $wgRestrictionTypes;
289 - foreach( $wgRestrictionTypes as $action ) {
 288+ foreach ( $wgRestrictionTypes as $action ) {
290289 $vars->setLazyLoadVar( "{$prefix}_restrictions_$action", 'get-page-restrictions',
291290 array( 'title' => $title->getText(),
292291 'namespace' => $title->getNamespace(),
@@ -434,7 +433,7 @@
435434 }
436435
437436 public static function checkFilter( $row, $vars, $profile = false, $prefix = '' ) {
438 - $filterID = $prefix.$row->af_id;
 437+ $filterID = $prefix . $row->af_id;
439438
440439 if ( $profile ) {
441440 $startConds = self::$condCount;
@@ -490,7 +489,7 @@
491490
492491 if ( $curCount ) {
493492 $wgMemc->set( $totalCondKey, $curTotalConds + $conds, 3600 );
494 - $wgMemc->set( $totalKey, $curTotal + $time, 3600 );
 493+ $wgMemc->set( $totalKey, $curTotal + $time, 3600 );
495494 $wgMemc->incr( $countKey );
496495 } else {
497496 $wgMemc->set( $countKey, 1, 3600 );
@@ -514,7 +513,7 @@
515514 return array( 0, 0 );
516515
517516 $timeProfile = ( $curTotal / $curCount ) * 1000; // 1000 ms in a sec
518 - $timeProfile = round( $timeProfile, 2); // Return in ms, rounded to 2dp
 517+ $timeProfile = round( $timeProfile, 2 ); // Return in ms, rounded to 2dp
519518
520519 $condProfile = ( $curTotalConds / $curCount );
521520 $condProfile = round( $condProfile, 0 );
@@ -535,7 +534,7 @@
536535 $globalFilters = array();
537536 $localFilters = array();
538537
539 - foreach( $filters as $filter ) {
 538+ foreach ( $filters as $filter ) {
540539 $globalIndex = self::decodeGlobalName( $filter );
541540
542541 if ( $globalIndex )
@@ -565,7 +564,7 @@
566565
567566 public static function loadConsequencesFromDB( $dbr, $filters, $prefix = '' ) {
568567 $actionsByFilter = array();
569 - foreach( $filters as $filter ) {
 568+ foreach ( $filters as $filter ) {
570569 $actionsByFilter[$prefix . $filter] = array();
571570 }
572571
@@ -584,7 +583,7 @@
585584 if ( $row->af_throttled
586585 && in_array( $row->afa_consequence, $wgAbuseFilterRestrictedActions ) )
587586 {
588 - ## Don't do the action
 587+ # # Don't do the action
589588 } elseif ( $row->afa_filter != $row->af_id ) {
590589 // We probably got a NULL, as it's a LEFT JOIN.
591590 // Don't add it.
@@ -616,7 +615,7 @@
617616
618617 $messages = array();
619618
620 - foreach( $actionsByFilter as $filter => $actions ) {
 619+ foreach ( $actionsByFilter as $filter => $actions ) {
621620 // Special-case handling for warnings.
622621 global $wgOut;
623622 $parsed_public_comments = $wgOut->parseInline(
@@ -630,13 +629,13 @@
631630 $hitThrottle = false;
632631
633632 // The rest are throttle-types.
634 - foreach( $parameters as $throttleType ) {
 633+ foreach ( $parameters as $throttleType ) {
635634 $hitThrottle = $hitThrottle || self::isThrottled(
636635 $throttleId, $throttleType, $title, $rateCount, $ratePeriod );
637636 }
638637
639638 unset( $actions['throttle'] );
640 - if (!$hitThrottle) {
 639+ if ( !$hitThrottle ) {
641640 $actionsTaken[$filter][] = 'throttle';
642641 continue;
643642 }
@@ -675,7 +674,7 @@
676675 }
677676
678677 // Do the rest of the actions
679 - foreach( $actions as $action => $info ) {
 678+ foreach ( $actions as $action => $info ) {
680679 $newMsg = self::takeConsequenceAction(
681680 $action, $info['parameters'], $title, $vars,
682681 self::$filters[$filter]->af_public_comments
@@ -727,7 +726,7 @@
728727 $log_template = array(
729728 'afl_user' => $wgUser->getId(),
730729 'afl_user_text' => $wgUser->getName(),
731 - 'afl_timestamp' => $dbr->timestamp(wfTimestampNow()),
 730+ 'afl_timestamp' => $dbr->timestamp( wfTimestampNow() ),
732731 'afl_namespace' => $title->getNamespace(),
733732 'afl_title' => $title->getDBkey(),
734733 'afl_ip' => wfGetIP()
@@ -762,7 +761,7 @@
763762 $logged_local_filters = array();
764763 $logged_global_filters = array();
765764
766 - foreach( $actions_taken as $filter => $actions ) {
 765+ foreach ( $actions_taken as $filter => $actions ) {
767766 $globalIndex = self::decodeGlobalName( $filter );
768767 $thisLog = $log_template;
769768 $thisLog['afl_filter'] = $filter;
@@ -800,7 +799,7 @@
801800 $var_dump = self::storeVarDump( $vars );
802801 $var_dump = "stored-text:$var_dump"; // To distinguish from stuff stored directly
803802
804 - foreach( $log_rows as $index => $data ) {
 803+ foreach ( $log_rows as $index => $data ) {
805804 $log_rows[$index]['afl_var_dump'] = $var_dump;
806805 }
807806
@@ -827,7 +826,7 @@
828827 $vars->computeDBVars();
829828 $global_var_dump = self::storeVarDump( $vars, 'global' );
830829 $global_var_dump = "stored-text:$global_var_dump";
831 - foreach( $central_log_rows as $index => $data ) {
 830+ foreach ( $central_log_rows as $index => $data ) {
832831 $central_log_rows[$index]['afl_var_dump'] = $global_var_dump;
833832 }
834833
@@ -867,7 +866,7 @@
868867
869868 $flags = array();
870869
871 - if( $wgCompressRevisions ) {
 870+ if ( $wgCompressRevisions ) {
872871 if ( function_exists( 'gzdeflate' ) ) {
873872 $text = gzdeflate( $text );
874873 $flags[] = 'gzip';
@@ -1054,7 +1053,7 @@
10551054 // Remove all groups from the user. Ouch.
10561055 $groups = $wgUser->getGroups();
10571056
1058 - foreach( $groups as $group ) {
 1057+ foreach ( $groups as $group ) {
10591058 $wgUser->removeGroup( $group );
10601059 }
10611060
@@ -1084,7 +1083,7 @@
10851084 case 'blockautopromote':
10861085 global $wgUser, $wgMemc;
10871086 if ( !$wgUser->isAnon() ) {
1088 - $blockPeriod = (int)mt_rand( 3*86400, 7*86400 ); // Block for 3-7 days.
 1087+ $blockPeriod = (int)mt_rand( 3 * 86400, 7 * 86400 ); // Block for 3-7 days.
10891088 $wgMemc->set( self::autoPromoteBlockKey( $wgUser ), true, $blockPeriod );
10901089
10911090 $display .= wfMsgExt( 'abusefilter-autopromote-blocked', 'parseinline',
@@ -1181,7 +1180,7 @@
11821181
11831182 $identifiers = array();
11841183
1185 - foreach( $types as $subtype ) {
 1184+ foreach ( $types as $subtype ) {
11861185 $identifiers[] = self::throttleIdentifier( $subtype, $title );
11871186 }
11881187
@@ -1219,7 +1218,7 @@
12201219 $wgMemc->set( $total_key, 0, $storage_period );
12211220 $wgMemc->set( $overflow_key, 0, $storage_period );
12221221
1223 - foreach( $filters as $filter => $matched ) {
 1222+ foreach ( $filters as $filter => $matched ) {
12241223 $wgMemc->set( self::filterMatchesKey( $filter ), 0, $storage_period );
12251224 }
12261225 $wgMemc->set( self::filterMatchesKey(), 0, $storage_period );
@@ -1239,7 +1238,7 @@
12401239 global $wgAbuseFilterEmergencyDisableThreshold, $wgAbuseFilterEmergencyDisableCount,
12411240 $wgAbuseFilterEmergencyDisableAge, $wgMemc;
12421241
1243 - foreach( $filters as $filter ) {
 1242+ foreach ( $filters as $filter ) {
12441243 // Increment counter
12451244 $matchCount = $wgMemc->get( self::filterMatchesKey( $filter ) );
12461245
@@ -1340,14 +1339,14 @@
13411340
13421341 $builder .= Xml::option( wfMsg( 'abusefilter-edit-builder-select' ) );
13431342
1344 - foreach( $dropDown as $group => $values ) {
 1343+ foreach ( $dropDown as $group => $values ) {
13451344 $builder .=
13461345 Xml::openElement(
13471346 'optgroup',
13481347 array( 'label' => wfMsg( "abusefilter-edit-builder-group-$group" ) )
13491348 ) . "\n";
13501349
1351 - foreach( $values as $content => $name ) {
 1350+ foreach ( $values as $content => $name ) {
13521351 $builder .=
13531352 Xml::option(
13541353 wfMsg( "abusefilter-edit-builder-$group-$name" ),
@@ -1362,7 +1361,7 @@
13631362 Xml::tags(
13641363 'select',
13651364 array( 'id' => 'wpFilterBuilder', 'onchange' => 'addText();' ),
1366 - $builder
 1365+ $builder
13671366 ) . ' ';
13681367
13691368 // Add syntax checking
@@ -1375,8 +1374,8 @@
13761375 ) + $noTestAttrib );
13771376
13781377 if ( $addResultDiv )
1379 - $rules .= Xml::element( 'div',
1380 - array( 'id' => 'mw-abusefilter-syntaxresult', 'style' => 'display: none;' ),
 1378+ $rules .= Xml::element( 'div',
 1379+ array( 'id' => 'mw-abusefilter-syntaxresult', 'style' => 'display: none;' ),
13811380 '&nbsp;' );
13821381
13831382 // Add script
@@ -1386,7 +1385,7 @@
13871386 // Import localisation.
13881387 $importMessages = array( 'abusefilter-edit-syntaxok', 'abusefilter-edit-syntaxerr' );
13891388 $msgData = array();
1390 - foreach( $importMessages as $msg ) {
 1389+ foreach ( $importMessages as $msg ) {
13911390 $msgData[$msg] = wfMsg( $msg );
13921391 }
13931392 $editScript .= "\nvar wgAbuseFilterMessages = " . json_encode( $msgData ) . ";\n";
@@ -1415,20 +1414,20 @@
14161415 list( $row1, $actions1 ) = $version_1;
14171416 list( $row2, $actions2 ) = $version_2;
14181417
1419 - foreach( $compareFields as $field ) {
 1418+ foreach ( $compareFields as $field ) {
14201419 if ( $row1->$field != $row2->$field ) {
14211420 $differences[] = $field;
14221421 }
14231422 }
14241423
14251424 global $wgAbuseFilterAvailableActions;
1426 - foreach( $wgAbuseFilterAvailableActions as $action ) {
 1425+ foreach ( $wgAbuseFilterAvailableActions as $action ) {
14271426 if ( !isset( $actions1[$action] ) && !isset( $actions2[$action] ) ) {
14281427 // They're both unset
14291428 } elseif ( isset( $actions1[$action] ) && isset( $actions2[$action] ) ) {
14301429 // They're both set.
1431 - if ( array_diff( $actions1[$action]['parameters'],
1432 - $actions2[$action]['parameters'] ) )
 1430+ if ( array_diff( $actions1[$action]['parameters'],
 1431+ $actions2[$action]['parameters'] ) )
14331432 {
14341433 // Different parameters
14351434 $differences[] = 'actions';
@@ -1443,31 +1442,31 @@
14441443 }
14451444
14461445 static function translateFromHistory( $row ) {
1447 - ## Translate into an abuse_filter row with some black magic.
1448 - ## This is ever so slightly evil!
 1446+ # # Translate into an abuse_filter row with some black magic.
 1447+ # # This is ever so slightly evil!
14491448 $af_row = new StdClass;
14501449
14511450 foreach ( self::$history_mappings as $af_col => $afh_col ) {
14521451 $af_row->$af_col = $row->$afh_col;
14531452 }
14541453
1455 - ## Process flags
 1454+ # # Process flags
14561455
14571456 $af_row->af_deleted = 0;
14581457 $af_row->af_hidden = 0;
14591458 $af_row->af_enabled = 0;
14601459
14611460 $flags = explode( ',', $row->afh_flags );
1462 - foreach( $flags as $flag ) {
 1461+ foreach ( $flags as $flag ) {
14631462 $col_name = "af_$flag";
14641463 $af_row->$col_name = 1;
14651464 }
14661465
1467 - ## Process actions
 1466+ # # Process actions
14681467 $actions_raw = unserialize( $row->afh_actions );
14691468 $actions_output = array();
14701469
1471 - foreach( $actions_raw as $action => $parameters ) {
 1470+ foreach ( $actions_raw as $action => $parameters ) {
14721471 $actions_output[$action] = array( 'action' => $action, 'parameters' => $parameters );
14731472 }
14741473
@@ -1538,7 +1537,7 @@
15391538 $vars->setVar( 'old_wikitext', '' );
15401539 }
15411540
1542 - $vars->addHolder( self::getEditVars(
 1541+ $vars->addHolder( self::getEditVars(
15431542 $title, $row->rc_this_oldid, $row->rc_last_oldid ) );
15441543
15451544 return $vars;
@@ -1608,7 +1607,7 @@
16091608 array( 'oldlink-var' => 'old_links', 'newlink-var' => 'all_links' ) );
16101609
16111610 $vars->setLazyLoadVar( 'new_html', 'parse-wikitext',
1612 - array(
 1611+ array(
16131612 'namespace' => $title->getNamespace(),
16141613 'title' => $title->getText(),
16151614 'wikitext-var' => 'new_wikitext'
@@ -1651,7 +1650,7 @@
16521651 $output .= Xml::tags( 'tr', null, $header ) . "\n";
16531652
16541653 // Now, build the body of the table.
1655 - foreach( $vars as $key => $value ) {
 1654+ foreach ( $vars as $key => $value ) {
16561655 $key = strtolower( $key );
16571656
16581657 if ( !empty( $variableMessageMappings[$key] ) ) {
@@ -1662,14 +1661,14 @@
16631662 $keyDisplay = Xml::element( 'tt', null, $key );
16641663 }
16651664
1666 - if( is_null( $value ) )
 1665+ if ( is_null( $value ) )
16671666 $value = '';
16681667 $value = Xml::element( 'div', array( 'class' => 'mw-abuselog-var-value' ), $value );
16691668
16701669 $trow =
1671 - Xml::tags( 'td', array( 'class' => 'mw-abuselog-var' ), $keyDisplay ) .
 1670+ Xml::tags( 'td', array( 'class' => 'mw-abuselog-var' ), $keyDisplay ) .
16721671 Xml::tags( 'td', array( 'class' => 'mw-abuselog-var-value' ), $value );
1673 - $output .=
 1672+ $output .=
16741673 Xml::tags( 'tr',
16751674 array( 'class' => "mw-abuselog-details-$key mw-abuselog-value" ), $trow
16761675 ) . "\n";
@@ -1679,7 +1678,7 @@
16801679 return $output;
16811680 }
16821681
1683 - static function modifyActionText( $page, $type, $title, $sk, $args ) {
 1682+ static function modifyActionText( $page, $type, $title, $sk, $args ) {
16841683 list( $history_id, $filter_id ) = $args;
16851684
16861685 $filter_link = $sk ? $sk->link( $title ) : $title->getFullURL();
@@ -1690,12 +1689,12 @@
16911690 $sk ? $sk->link( $details_title, $details_text ) : $details_title->getFullURL();
16921691
16931692 return wfMsgExt( 'abusefilter-log-entry-modify',
1694 - array('parseinline','replaceafter'), array( $filter_link, $details_link ) );
 1693+ array( 'parseinline', 'replaceafter' ), array( $filter_link, $details_link ) );
16951694 }
16961695
16971696 static function formatAction( $action, $parameters ) {
16981697 global $wgLang;
1699 - if( count( $parameters ) == 0 ) {
 1698+ if ( count( $parameters ) == 0 ) {
17001699 $displayAction = AbuseFilter::getActionDisplay( $action );
17011700 } else {
17021701 $displayAction = AbuseFilter::getActionDisplay( $action ) .
@@ -1709,7 +1708,7 @@
17101709 global $wgLang;
17111710 $flags = array_filter( explode( ',', $value ) );
17121711 $flags_display = array();
1713 - foreach( $flags as $flag ) {
 1712+ foreach ( $flags as $flag ) {
17141713 $flags_display[] = wfMsg( "abusefilter-history-$flag" );
17151714 }
17161715 return $wgLang->commaList( $flags_display );
Index: trunk/extensions/AbuseFilter/AbuseFilterVariableHolder.php
@@ -1,5 +1,4 @@
22 <?php
3 -
43 class AbuseFilterVariableHolder {
54 var $mVars = array();
65 static $varBlacklist = array( 'context' );
@@ -36,7 +35,7 @@
3736 static function merge() {
3837 $newHolder = new AbuseFilterVariableHolder;
3938
40 - foreach( func_get_args() as $addHolder ) {
 39+ foreach ( func_get_args() as $addHolder ) {
4140 $newHolder->addHolder( $addHolder );
4241 }
4342
@@ -59,7 +58,7 @@
6059 $allVarNames = array_keys( $this->mVars );
6160 $exported = array();
6261
63 - foreach( $allVarNames as $varName ) {
 62+ foreach ( $allVarNames as $varName ) {
6463 if ( !in_array( $varName, self::$varBlacklist ) ) {
6564 $exported[$varName] = $this->getVar( $varName )->toString();
6665 }
@@ -88,7 +87,7 @@
8988 'revision-text-by-timestamp'
9089 );
9190
92 - foreach( $this->mVars as $name => $value ) {
 91+ foreach ( $this->mVars as $name => $value ) {
9392 if ( $value instanceof AFComputedVariable &&
9493 in_array( $value->mMethod, $dbTypes ) ) {
9594 $value = $value->compute( $this );
@@ -96,7 +95,6 @@
9796 }
9897 }
9998 }
100 -
10199 }
102100
103101 class AFComputedVariable {
@@ -177,9 +175,9 @@
178176 if ( !$id ) {
179177 return array();
180178 }
181 -
 179+
182180 $dbr = wfGetDB( DB_SLAVE );
183 - $res = $dbr->select( 'externallinks', array( 'el_to' ),
 181+ $res = $dbr->select( 'externallinks', array( 'el_to' ),
184182 array( 'el_from' => $id ), __METHOD__ );
185183 $links = array();
186184 while ( $row = $dbr->fetchObject( $res ) ) {
@@ -205,7 +203,7 @@
206204 $line_prefix = $parameters['line-prefix'];
207205 $diff_lines = explode( "\n", $diff );
208206 $interest_lines = array();
209 - foreach( $diff_lines as $line ) {
 207+ foreach ( $diff_lines as $line ) {
210208 if ( substr( $line, 0, 1 ) === $line_prefix ) {
211209 $interest_lines[] = substr( $line, strlen( $line_prefix ) );
212210 }
@@ -237,10 +235,10 @@
238236 $article = self::articleFromTitle( $parameters['namespace'],
239237 $parameters['title'] );
240238
241 - if ( $vars->getVar( 'context' )->toString() == 'filter') {
 239+ if ( $vars->getVar( 'context' )->toString() == 'filter' ) {
242240 $links = $this->getLinksFromDB( $article );
243241 wfDebug( "AbuseFilter: loading old links from DB\n" );
244 - } else {
 242+ } else {
245243 wfDebug( "AbuseFilter: loading old links from Parser\n" );
246244 $textVar = $parameters['text-var'];
247245
@@ -280,7 +278,7 @@
281279 $new_text = $vars->getVar( $textVar )->toString();
282280 $editInfo = $article->prepareTextForEdit( $new_text );
283281 $newHTML = $editInfo->output->getText();
284 - // Kill the PP limit comments. Ideally we'd just remove these by not setting the
 282+ // Kill the PP limit comments. Ideally we'd just remove these by not setting the
285283 // parser option, but then we can't share a parse operation with the edit, which is bad.
286284 $result = preg_replace( '/<!--\s*NewPP limit report[^>]*-->\s*$/si', '', $newHTML );
287285 } else {
@@ -323,7 +321,7 @@
324322 );
325323
326324 $users = array();
327 - while( $user = $dbr->fetchRow( $res ) ) {
 325+ while ( $user = $dbr->fetchRow( $res ) ) {
328326 $users[] = $user[0];
329327 }
330328 $result = $users;
Index: trunk/extensions/AbuseFilter/ApiQueryAbuseLog.php
@@ -1,5 +1,4 @@
22 <?php
3 -
43 /**
54 * Created on Mar 28, 2009
65 *
@@ -31,14 +30,13 @@
3231 * @ingroup Extensions
3332 */
3433 class ApiQueryAbuseLog extends ApiQueryBase {
35 -
3634 public function __construct( $query, $moduleName ) {
3735 parent::__construct( $query, $moduleName, 'afl' );
3836 }
3937
4038 public function execute() {
4139 global $wgUser;
42 - if( !$wgUser->isAllowed( 'abusefilter-log' ) )
 40+ if ( !$wgUser->isAllowed( 'abusefilter-log' ) )
4341 $this->dieUsage( 'You don\'t have permission to view the abuse log', 'permissiondenied' );
4442
4543 $params = $this->extractRequestParams();
@@ -54,9 +52,9 @@
5553 $fld_result = isset( $prop['result'] );
5654 $fld_timestamp = isset( $prop['timestamp'] );
5755
58 - if( $fld_ip && !$wgUser->isAllowed( 'abusefilter-private' ) )
 56+ if ( $fld_ip && !$wgUser->isAllowed( 'abusefilter-private' ) )
5957 $this->dieUsage( 'You don\'t have permission to view IP addresses', 'permissiondenied' );
60 - if( $fld_details && !$wgUser->isAllowed( 'abusefilter-log-detail' ) )
 58+ if ( $fld_details && !$wgUser->isAllowed( 'abusefilter-log-detail' ) )
6159 $this->dieUsage( 'You don\'t have permission to view detailed abuse log entries', 'permissiondenied' );
6260
6361 $result = $this->getResult();
@@ -70,7 +68,7 @@
7169 $this->addFieldsIf( 'afl_action', $fld_action );
7270 $this->addFieldsIf( 'afl_var_dump', $fld_details );
7371 $this->addFieldsIf( 'afl_actions', $fld_result );
74 - if( $fld_filter ) {
 72+ if ( $fld_filter ) {
7573 $this->addTables( 'abuse_filter' );
7674 $this->addFields( 'af_public_comments' );
7775 $this->addJoinConds( array( 'abuse_filter' => array( 'LEFT JOIN',
@@ -81,8 +79,8 @@
8280
8381 $this->addWhereRange( 'afl_timestamp', $params['dir'], $params['start'], $params['end'] );
8482
85 - $this->addWhereIf( array('afl_user_text' => $params['user'] ), isset( $params['user'] ) );
86 - $this->addWhereIf( array('afl_filter' => $params['filter'] ), isset( $params['filter'] ) );
 83+ $this->addWhereIf( array( 'afl_user_text' => $params['user'] ), isset( $params['user'] ) );
 84+ $this->addWhereIf( array( 'afl_filter' => $params['filter'] ), isset( $params['filter'] ) );
8785
8886 $title = $params['title'];
8987 if ( !is_null( $title ) ) {
@@ -95,34 +93,34 @@
9694 $res = $this->select( __METHOD__ );
9795
9896 $count = 0;
99 - while( $row = $res->fetchObject() ) {
100 - if( ++$count > $params['limit'] ) {
 97+ while ( $row = $res->fetchObject() ) {
 98+ if ( ++$count > $params['limit'] ) {
10199 // We've had enough
102100 $this->setContinueEnumParameter( 'start', wfTimestamp( TS_ISO_8601, $row->afl_timestamp ) );
103101 break;
104102 }
105103 $entry = array();
106 - if( $fld_ids ) {
 104+ if ( $fld_ids ) {
107105 $entry['id'] = intval( $row->afl_id );
108106 $entry['filter_id'] = intval( $row->afl_filter );
109107 }
110 - if( $fld_filter )
 108+ if ( $fld_filter )
111109 $entry['filter'] = $row->af_public_comments;
112 - if( $fld_user )
 110+ if ( $fld_user )
113111 $entry['user'] = $row->afl_user_text;
114 - if( $fld_ip )
 112+ if ( $fld_ip )
115113 $entry['ip'] = $row->afl_ip;
116 - if( $fld_title ) {
 114+ if ( $fld_title ) {
117115 $title = Title::makeTitle( $row->afl_namespace, $row->afl_title );
118116 ApiQueryBase::addTitleInfo( $entry, $title );
119117 }
120 - if( $fld_action )
 118+ if ( $fld_action )
121119 $entry['action'] = $row->afl_action;
122 - if( $fld_result )
 120+ if ( $fld_result )
123121 $entry['result'] = $row->afl_actions;
124 - if( $fld_timestamp )
 122+ if ( $fld_timestamp )
125123 $entry['timestamp'] = wfTimestamp( TS_ISO_8601, $row->afl_timestamp );
126 - if( $fld_details ) {
 124+ if ( $fld_details ) {
127125 $vars = AbuseFilter::loadVarDump( $row->afl_var_dump );
128126 if ( $vars instanceof AbuseFilterVariableHolder ) {
129127 $entry['details'] = $vars->exportAllVars();
@@ -132,7 +130,7 @@
133131 }
134132 if ( $entry ) {
135133 $fit = $result->addValue( array( 'query', $this->getModuleName() ), null, $entry );
136 - if( !$fit ) {
 134+ if ( !$fit ) {
137135 $this->setContinueEnumParameter( 'start', wfTimestamp( TS_ISO_8601, $row->afl_timestamp ) );
138136 break;
139137 }
@@ -182,7 +180,7 @@
183181 ApiBase::PARAM_ISMULTI => true
184182 )
185183 );
186 - }
 184+ }
187185
188186 public function getParamDescription() {
189187 return array(
@@ -191,7 +189,7 @@
192190 'dir' => 'The direction in which to enumerate',
193191 'title' => 'Show only entries occurring on a given page.',
194192 'user' => 'Show only entries done by a given user or IP address.',
195 - 'filter' => 'Show only entries that were caught by a given filter ID',
 193+ 'filter' => 'Show only entries that were caught by a given filter ID',
196194 'limit' => 'The maximum amount of entries to list',
197195 'prop' => 'Which properties to get',
198196 );
Index: trunk/extensions/AbuseFilter/AbuseFilter.i18n.php
@@ -315,7 +315,7 @@
316316 'abusefilter-edit-builder-vars-old-html' => 'Old page wikitext, parsed into HTML',
317317 'abusefilter-edit-builder-vars-minor-edit' => 'Whether or not the edit is marked as minor',
318318 'abusefilter-edit-builder-vars-file-sha1' => 'SHA1 hash of file contents',
319 -
 319+
320320 // Filter history
321321 'abusefilter-filter-log' => 'Recent filter changes',
322322 'abusefilter-history' => 'Change history for Abuse Filter #$1',
@@ -420,7 +420,7 @@
421421 'abusefilter-examine-notfound' => 'The change you requested could not be found.',
422422 'abusefilter-examine-incompatible' => 'The change you requested is not supported by the Abuse Filter',
423423 'abusefilter-examine-noresults' => 'No results were found for the search parameters you provided.',
424 -
 424+
425425 // Top navigation interface
426426 'abusefilter-topnav' => "'''Abuse Filter navigation'''",
427427 'abusefilter-topnav-home' => 'Home',
@@ -429,13 +429,13 @@
430430 'abusefilter-topnav-log' => 'Abuse Log',
431431 'abusefilter-topnav-tools' => 'Debugging tools',
432432 'abusefilter-topnav-import' => 'Import filter',
433 -
 433+
434434 // Logging
435435 'abusefilter-log-name' => 'Abuse Filter log',
436436 'abusefilter-log-header' => "This log shows a summary of changes made to filters.
437437 For full details, see [[Special:AbuseFilter/history|the list]] of recent filter changes.",
438438 'abusefilter-log-entry-modify' => 'modified $1 ($2)',
439 -
 439+
440440 // Diffs
441441 'abusefilter-diff-title' => 'Differences between versions',
442442 'abusefilter-diff-item' => 'Item',
@@ -444,7 +444,7 @@
445445 'abusefilter-diff-pattern' => 'Filter conditions',
446446 'abusefilter-diff-invalid' => 'Unable to fetch the requested versions',
447447 'abusefilter-diff-backhistory' => 'Back to filter history',
448 -
 448+
449449 // Import interface
450450 'abusefilter-import-intro' => 'You can use this interface to import filters from other wikis.
451451 On the source wiki, click "{{int:abusefilter-edit-export}}" under "{{int:abusefilter-tools-subtitle}}" on the editing interface.
@@ -2055,7 +2055,7 @@
20562056 'abusefilter' => 'Настройка на защитата от вредоносни действия',
20572057 'abuselog' => 'Дневник на вредоносните действия',
20582058 'abusefilter-intro' => 'Добре дошли в административния интерфейс на Филтъра срещу злоупотреби.
2059 -Филтърът срещу злоупотреби е автоматизиран софтуерен механизъм за прилагане на евристични оценки към разнообразни действия.
 2059+Филтърът срещу злоупотреби е автоматизиран софтуерен механизъм за прилагане на евристични оценки към разнообразни действия.
20602060 Този интерфейс показва списък на дефинираните филтри с възможност те да бъдат променяни.',
20612061 'abusefilter-mustbeeditor' => 'От съображения за сигурност само потребители с права да променят филтрите срещу злоупотреби могат да използват този интерфейс.',
20622062 'abusefilter-warning' => "<big>'''Внимание'''</big>: Извършваното действие беше автоматично разпознато като вредоносно.
@@ -2759,8 +2759,8 @@
27602760 'abusefilter-log-search-filter' => 'Filtriraj ID:',
27612761 'abusefilter-log-search-title' => 'Naslov:',
27622762 'abusefilter-log-search-submit' => 'Traži',
2763 - 'abusefilter-log-entry' => '$1: Korisnik $2 je pokrenuo filter za zloupotrebu, napravivši akciju "$3" na $4.
2764 -Napravljena akcija: $5;
 2763+ 'abusefilter-log-entry' => '$1: Korisnik $2 je pokrenuo filter za zloupotrebu, napravivši akciju "$3" na $4.
 2764+Napravljena akcija: $5;
27652765 Opis filtera: $6',
27662766 'abusefilter-log-detailedentry-meta' => '$1: Korisnik $2 pokrenuo $3, napravivši akciju "$4" na $5. Napravljena akcija: $6; Opis filtera: $7 ($8{{int:pipe-separator}}$9)',
27672767 'abusefilter-log-detailedentry-global' => 'globalni filter $1',
@@ -3678,7 +3678,7 @@
36793679 Denne grænseflade viser en liste over definerede filtre, og gør det muligt at ændre dem.',
36803680 'abusefilter-mustbeeditor' => 'Af sikkerhedsmæssige årsager kan denne grænseflade kun bruges af brugere med rettigheder til at ændre misbrugsfiltre.',
36813681 'abusefilter-warning' => "<big>'''Advarsel:'''</big> Denne handling er automatisk blevet identificeret som skadelig.
3682 -Ikke-konstruktive redigeringer bliver hurtigt fjernet,
 3682+Ikke-konstruktive redigeringer bliver hurtigt fjernet,
36833683 og forstyrrende eller gentagende ikke-konstruktive redigeringer vil føre til at din konto eller computer bliver blokeret.
36843684 Hvis du mener at dette er en konstruktiv redigering så klik på \"Gem\" igen for at bekræfte.
36853685 En kortfattet beskrivelse af misbrugsreglen som din handling udløste er: \$1",
@@ -4471,28 +4471,28 @@
44724472 'abusefilter' => 'Konfigurasyonê filitere yê abusî',
44734473 'abuselog' => 'Logê abuseyî',
44744474 'abusefilter-intro' => 'Îdareyê filitreyê abuseyî şima xeyr ameyî.
4475 -Filitreyê abuseyî yew softwareyê otomatikî ke otomatik heuristics applikasyon keno.
 4475+Filitreyê abuseyî yew softwareyê otomatikî ke otomatik heuristics applikasyon keno.
44764476 Ena pele yew listeyê filitreyî mucneno u vurnayîşan rê destur dano.',
44774477 'abusefilter-mustbeeditor' => 'Qe pawitişî, teyna kerberanê ke pê desturî eşkeno filitreyê abuseyî bivurne.',
4478 - 'abusefilter-warning' => "<big>'''Îkaz'''</big>: Ena hereket hewl niyo u zerar dano.
 4478+ 'abusefilter-warning' => "<big>'''Îkaz'''</big>: Ena hereket hewl niyo u zerar dano.
44794479 Ma vurnayîşanê ke zerarin lez wedarneno,
44804480 eyni zeman de, eka ti ser vurnayîşê xo zerarin de zaf israr kenî, ma hesab u komputerê tu blok kenî.
44814481 Eka ti van vurnayîşê xo konstraktif o ya zi hewl o, rena qeyd bike.
44824482 Yew deskripsiyonê hereketê tu zerarin: $1",
44834483 'abusefilter-disallowed' => 'Ena hereket hewl niyo u zerar dano,
4484 -ayra destur çini yo.
 4484+ayra destur çini yo.
44854485 Eka ti van vurnayîşê xo konstraktif o ya zi hewl o, yew îdare kerdoğê sîteyî rê mesaj bişirave.
44864486 Yew deskripsiyonê hereketê tu zerarin: $1',
44874487 'abusefilter-blocked-display' => 'Ena hereket hewl niyo u zerar dano,
44884488 aye ra ti niekeno qeyd bike.
4489 -Eyni zemun de, qe pawitişê {{SITENAME}}î hesab u IPyê tu blok biyo.
 4489+Eyni zemun de, qe pawitişê {{SITENAME}}î hesab u IPyê tu blok biyo.
44904490 Eka ti van ma yew ğeletî keno, yew îdare kerdoğê sîteyî rê mesaj bişirave.
44914491 Yew deskripsiyonê hereketê tu zerarin: $1',
44924492 'abusefilter-degrouped' => 'Ena hereket hewl niyo u zerar dano.
44934493 Aye ra destur tu çini yo u heqanê tu yê hemî ma ti ra grewt.
4494 -Eka ti van ma yew ğeletî keno, yew îdare kerdoğê sîteyî rê mesaj bişirave. Eka yew ğelet esto, ma heqanê tu yê hemî reyna dan.
 4494+Eka ti van ma yew ğeletî keno, yew îdare kerdoğê sîteyî rê mesaj bişirave. Eka yew ğelet esto, ma heqanê tu yê hemî reyna dan.
44954495 Yew deskripsiyonê hereketê tu zerarin: $1',
4496 - 'abusefilter-autopromote-blocked' => 'Ena hereket hewl niyo u zerar dano u aye ra destur tu çini yo.
 4496+ 'abusefilter-autopromote-blocked' => 'Ena hereket hewl niyo u zerar dano u aye ra destur tu çini yo.
44974497 Qe pawitişê sîte, heqanê tu yê nime ma ti ra grewt.
44984498 Yew deskripsiyonê hereketê tu zerarin: $1',
44994499 'abusefilter-blocker' => 'Filitreyê abuseyî',
@@ -4853,7 +4853,7 @@
48544854 'abusefilter-diff-invalid' => 'Nieşkenî versiyonê ke ti wazeno fetch bike',
48554855 'abusefilter-diff-backhistory' => 'Tarixê filitreyî reyna şi',
48564856 'abusefilter-import-intro' => 'Ti eşkeno ser ena ripel de wîkîyî binan ra filitre împort bike.
4857 -Wîkî çimeyî de bine "{{int:abusefilter-tools-subtitle}}" de "{{int:abusefilter-edit-export}}" klik bike.
 4857+Wîkî çimeyî de bine "{{int:abusefilter-tools-subtitle}}" de "{{int:abusefilter-edit-export}}" klik bike.
48584858 Kutiyê nuştîşî kopye bike u ena kutiyê nuştîş rê na pa u klik bike "{{int:abusefilter-import-submit}}".',
48594859 'abusefilter-import-submit' => 'Data împort bike',
48604860 );
@@ -7171,7 +7171,7 @@
71727172 Syy: $1',
71737173 'abusefilter-degrouped' => 'Tämä toimenpide on automaattisesti tunnistettu haitalliseksi.
71747174 Siitä johtuen sitä ei ole sallittu, ja koska käyttäjätilisi on epäilty olevan murrettu, sen kaikki oikeudet on peruttu.
7175 -Mikäli tämä on ollut mielestäsi erehdys, ota yhteyttä byrokraattiin ja esitä perustelusi tälle toimenpiteelle, niin oikeutesi saatetaan palauttaa.
 7175+Mikäli tämä on ollut mielestäsi erehdys, ota yhteyttä byrokraattiin ja esitä perustelusi tälle toimenpiteelle, niin oikeutesi saatetaan palauttaa.
71767176 Lyhyt kuvaus väärinkäyttösuodattimen säännöstä, joka täsmää toimenpiteeseesi on: $1',
71777177 'abusefilter-autopromote-blocked' => 'Tämä toimenpide on automaattisesti tunnistettu haitalliseksi, ja sitä ei ole sallittu.
71787178 Turvallisuussyistä jotkin rutiininomaisesti peruskäyttäjille myönnetyt etuoikeudet on väliaikaisesti poistettu käyttäjätunnukseltasi.
@@ -7204,10 +7204,10 @@
72057205 'abusefilter-log-search-filter' => 'Tunniste',
72067206 'abusefilter-log-search-title' => 'Otsikko:',
72077207 'abusefilter-log-search-submit' => 'Etsi',
7208 - 'abusefilter-log-entry' => '$1: $2 laukaisi väärinkäyttösuodattimen käyttäessään toimintoa ”$3” osoitteessa $4.
 7208+ 'abusefilter-log-entry' => '$1: $2 laukaisi väärinkäyttösuodattimen käyttäessään toimintoa ”$3” osoitteessa $4.
72097209 Laukaistut toiminnot: $5
72107210 Suodattimen kuvaus: $6',
7211 - 'abusefilter-log-detailedentry-meta' => '$1: $2 laukaisi suodattimen $3 käyttäessään toimintoa ”$4” osoitteessa $5.
 7211+ 'abusefilter-log-detailedentry-meta' => '$1: $2 laukaisi suodattimen $3 käyttäessään toimintoa ”$4” osoitteessa $5.
72127212 Laukaistut toiminnot: $6
72137213 Suodattimen kuvaus: $7 ($8{{int:pipe-separator}}$9)',
72147214 'abusefilter-log-detailedentry-local' => 'suodatin $1',
@@ -7266,8 +7266,8 @@
72677267 'abusefilter-reautoconfirm-done' => 'Tunnuksen automaattisesti hyväksytyn tila on palautettu',
72687268 'abusefilter-status' => 'Viimeisestä $1 {{PLURAL:$1|toiminnosta|toiminnosta}}, $2 ($3 %) {{PLURAL:$2|saavutti|saavutti}} ehtorajan $4, ja $5 ($6 %) {{PLURAL:$5|täsmäsi|täsmäsi}} yhteen nyt käytössä olevista suodattimista.',
72697269 'abusefilter-edit-subtitle' => 'Muokataan suodatinta $1',
7270 - 'abusefilter-edit-oldwarning' => '<strong>Muokkaat tämän suodattimen vanhaa versiota.
7271 -Annetut tilastot ovat suodattimen uusimmalle versiolle.
 7270+ 'abusefilter-edit-oldwarning' => '<strong>Muokkaat tämän suodattimen vanhaa versiota.
 7271+Annetut tilastot ovat suodattimen uusimmalle versiolle.
72727272 Jos tallennat muutoksesi, yliajat kaikki muokkaamasi version jälkeen tehdyt muutokset.</strong> &bull;
72737273 [[Special:AbuseFilter/history/$2|Palaa suodattimen historiaan]].',
72747274 'abusefilter-edit-status-label' => 'Tilastot:',
@@ -7317,7 +7317,7 @@
73187318 'abusefilter-edit-done' => 'Muutokset suodattimeen $1 tallennettiin onnistuneesti.',
73197319 'abusefilter-edit-badsyntax' => 'Suodattimessa, jonka määritit on syntaksivirhe.
73207320 Jäsentimen palaute: <pre>$1</pre>',
7321 - 'abusefilter-edit-restricted' => 'Et voi muuttaa tätä suodatinta, koska se sisältää yhden tai useamman rajoitetun toiminnon.
 7321+ 'abusefilter-edit-restricted' => 'Et voi muuttaa tätä suodatinta, koska se sisältää yhden tai useamman rajoitetun toiminnon.
73227322 Pyydä rajoitettujen toimintojen lisäämiseen tarvittavien oikeuksien haltijalta, että tämä tekee muutoksen puolestasi.',
73237323 'abusefilter-edit-viewhistory' => 'Näytä suodattimen historia',
73247324 'abusefilter-edit-history' => 'Historia',
@@ -7481,7 +7481,7 @@
74827482 Annettu syy: $2',
74837483 'abusefilter-revert-reasonfield' => 'Palautuksen syy',
74847484 'abusefilter-test' => 'Kokeile suodatinta viimeisimpiin muokkauksiin',
7485 - 'abusefilter-test-intro' => 'Tämä sivu antaa sinun tarkistaa alla olevaan kenttään syötetyn suodattimen viimeistä $1 {{PLURAL:$1|muutosta|muutosta}} vasten.
 7485+ 'abusefilter-test-intro' => 'Tämä sivu antaa sinun tarkistaa alla olevaan kenttään syötetyn suodattimen viimeistä $1 {{PLURAL:$1|muutosta|muutosta}} vasten.
74867486 Ladataksesi olemassa olevan suodattimen, kirjoita sen tunniste tekstikentän alapuolella olevaan kenttään ja napsauta ”Lataa”-painiketta.',
74877487 'abusefilter-test-legend' => 'Suodattimen kokeilu',
74887488 'abusefilter-test-load-filter' => 'Lataa suodatin tunnisteella:',
@@ -8430,7 +8430,7 @@
84318431 'abusefilter-edit-subtitle' => 'Editando o filtro $1',
84328432 'abusefilter-edit-oldwarning' => '<strong>Está a editar unha versión vella deste filtro.
84338433 As estatísticas citadas son da versión máis recente do filtro.
8434 -Se garda os seus cambios, sobrescribirá todos os cambios desde a revisión que está editando.</strong> &bull;
 8434+Se garda os seus cambios, sobrescribirá todos os cambios desde a revisión que está editando.</strong> &bull;
84358435 [[Special:AbuseFilter/history/$2|Voltar ao historial deste filtro]]',
84368436 'abusefilter-edit-status-label' => 'Estatísticas:',
84378437 'abusefilter-edit-status' => '{{PLURAL:$1|Da última acción|Das $1 últimas accións}}, este filtro coincidiu con $2 ($3%).
@@ -9125,7 +9125,7 @@
91269126 'abusefilter-revert-periodend' => 'Änd vum Zytruum:',
91279127 'abusefilter-revert-search' => 'Wehl Aktione uus',
91289128 'abusefilter-revert-filter' => 'Filter:',
9129 - 'abusefilter-revert-preview-intro' => 'Do unte sin d Aktion vum Missbruuchfilter, wu dur die Aktion zrugggsetzt wäre.
 9129+ 'abusefilter-revert-preview-intro' => 'Do unte sin d Aktion vum Missbruuchfilter, wu dur die Aktion zrugggsetzt wäre.
91309130 Bitte prief si sorgfältig un druck "Bstätige" go Dyyni Uuswahl bstätige.',
91319131 'abusefilter-revert-confirm' => 'Bstätige',
91329132 'abusefilter-revert-success' => 'Du hesch alli Aktionen zrugggsetzt, wu vum Missbruuchsfilter mgacht wore sin wäg em [[Special:AbuseFilter/$1|Filter $1]].',
@@ -9282,7 +9282,7 @@
92839283 'abusefilter-log-search-title' => 'כותרת:',
92849284 'abusefilter-log-search-submit' => 'חיפוש',
92859285 'abusefilter-log-entry' => '$1: $2 הפעיל את מסנן ההשחתות כשביצע את הפעולה $3 על $4.
9286 -פעולות שננקטו: $5;
 9286+פעולות שננקטו: $5;
92879287 תיאור המסנן: $6',
92889288 'abusefilter-log-detailedentry-meta' => '$1: $2 הפעיל את $3 כשביצע את הפעולה "$4" על $5.
92899289 הפעולות שננקטו: $6;
@@ -9679,7 +9679,7 @@
96809680 'abusefilter-log-entry' => '$1: $2 pokrenuo je filtar zloporabe, vršeći radnju "$3" na $4.
96819681 Poduzete radnje: $5;
96829682 Opis filtra: $6',
9683 - 'abusefilter-log-detailedentry-meta' => '$1: $2 pokrenuo je $3, vršeći radnju "$4" na $5.
 9683+ 'abusefilter-log-detailedentry-meta' => '$1: $2 pokrenuo je $3, vršeći radnju "$4" na $5.
96849684 Poduzete radnje: $6;
96859685 Opis filtra: $7 ($8{{int:pipe-separator}}$9)',
96869686 'abusefilter-log-detailedentry-local' => 'filtar $1',
@@ -9858,11 +9858,11 @@
98599859 'abusefilter-revert-filter' => 'Filtar:',
98609860 'abusefilter-revert-confirm' => 'Potvrdi',
98619861 'abusefilter-revert-success' => 'Vratili ste radnje poduzete od strane filtra zloporabe tijekom [[Special:AbuseFilter/$1|filtriranja $1]].',
9862 - 'abusefilter-revert-reason' => 'Automatsko vraćanje svih radnji poduzetih od strane filtra zloporabe tijekom filtriranja $1.
 9862+ 'abusefilter-revert-reason' => 'Automatsko vraćanje svih radnji poduzetih od strane filtra zloporabe tijekom filtriranja $1.
98639863 Razlog dan: $2',
98649864 'abusefilter-revert-reasonfield' => 'Razlog za vraćanje:',
98659865 'abusefilter-test' => 'Testiraj filtar s prethodnim uređivanjem',
9866 - 'abusefilter-test-intro' => 'Ova stranica omogućava provjeru filtra unešenog u donji okvir sa zadnjom $ 1 {{PLURAL:$1|promjenom|promjenama}}.
 9866+ 'abusefilter-test-intro' => 'Ova stranica omogućava provjeru filtra unešenog u donji okvir sa zadnjom $ 1 {{PLURAL:$1|promjenom|promjenama}}.
98679867 Za učitavanje postojećeg filtra, upišite ID filtra u okvir ispod okvira za uređenjivanje i kliknite tipku "Učitaj".',
98689868 'abusefilter-test-legend' => 'Testiranje filtra',
98699869 'abusefilter-test-load-filter' => 'Učitaj ID filtra:',
@@ -10319,16 +10319,16 @@
1032010320 nem hajtható végre.
1032110321 Ha úgy gondolod, hogy a szerkesztésed építő jellegű, lépj kapcsolatba egy adminisztrátorral, és jelezd neki, hogy mit szerettél volna csinálni.
1032210322 A visszaélési szabály rövid leírása, amelynek az általad végzett művelet megfelelt: $1',
10323 - 'abusefilter-blocked-display' => 'Ez a művelet automatikusan károsnak lett minősítve,
 10323+ 'abusefilter-blocked-display' => 'Ez a művelet automatikusan károsnak lett minősítve,
1032410324 így nem hajtható végre.
1032510325 A(z) {{SITENAME}} védelme érdekében a szerkesztõi fiókodat és az összes hozzátartozó IP címet blokkoltuk.
1032610326 Ha úgy gondolod, hogy a blokkolás egy rendszerhiba eredménye volt, lépj kapcsolatba egy adminisztrátorral, és jelezd neki, hogy mit szerettél volna csinálni.
1032710327 A visszaélési szabály rövid leírása, amelynek az általad végzett művelet megfelelt: $1',
1032810328 'abusefilter-degrouped' => 'Ez a művelet automatikusan károsnak lett minősítve, ezért nem engedélyezzük. Mivel a felhasználói fiókodat valószínűleg ártó szándékkal használják, az összes szerkesztési jogodat felfüggesztettük.
10329 -Ha szerinted ez egy rendszerhiba eredménye volt, akkor lépj kapcsolatba egy bürokratával és magyarázd el neki, hogy mi történt.
 10329+Ha szerinted ez egy rendszerhiba eredménye volt, akkor lépj kapcsolatba egy bürokratával és magyarázd el neki, hogy mi történt.
1033010330 A bürokrata eldöntheti, hogy visszaállítsa-e a korábbi jogaidat.
1033110331 A visszaélési szabály rövid leírása, amelynek az általad végzett művelet megfelelt: $1',
10332 - 'abusefilter-autopromote-blocked' => 'Ez a művelet automatikusan károsnak lett minősítve, így nem hajtható végre.
 10332+ 'abusefilter-autopromote-blocked' => 'Ez a művelet automatikusan károsnak lett minősítve, így nem hajtható végre.
1033310333 Biztonsági okokból bizonyos jogaidat visszavontuk.
1033410334 A visszaélési szabály rövid leírása, amelynek az általad végzett művelet megfelelt: $1',
1033510335 'abusefilter-blocker' => 'Vandálszűrő',
@@ -13119,7 +13119,7 @@
1312013120 'abusefilter-reautoconfirm-none' => '{{GENDER:$1|Dä|Dat|Dä Metmaacher|Dat|De}} „$1“ es bei de „{{lcfirst:{{int:group-autoconfirmed}}}}“ jeblevve.',
1312113121 'abusefilter-reautoconfirm-notallowed' => 'Do häs nit dat Rääsch, ene Metmaacher retuur bei de „{{int:group-autoconfirmed}}“ ze donn.',
1312213122 'abusefilter-reautoconfirm-done' => 'Dä Metmaacher es retuur bei de „{{int:group-autoconfirmed}}“.',
13123 - 'abusefilter-status' => '{{PLURAL:$1|De letzte Akßjuhn hät|Unger de letzte $1 Akßuhne {{PLURAL:$2|hädd_er eine|hann_er $2|hät kein}}|Kein Akßuhn hät}}
 13123+ 'abusefilter-status' => '{{PLURAL:$1|De letzte Akßjuhn hät|Unger de letzte $1 Akßuhne {{PLURAL:$2|hädd_er eine|hann_er $2|hät kein}}|Kein Akßuhn hät}}
1312413124 de Jränz fun {{PLURAL:$4|ein|$4|nix}} jetroffe odder övverschredde.
1312513125 Dat woren_er $3%.
1312613126 {{PLURAL:$5|Ein dovun es|Dovun sinn_er $5|Keine dovun es}} vun enem aktoäll aktive Fellter jejreffe woode.
@@ -13385,7 +13385,7 @@
1338613386 'abusefilter-topnav-tools' => 'Werkzüch för Fähler ze fenge',
1338713387 'abusefilter-topnav-import' => 'Feltere Empotteere',
1338813388 'abusefilter-log-name' => 'Et Logboch övver de Meßbruchsfelter',
13389 - 'abusefilter-log-header' => 'En däm Logboch he fingks De de Änderunge aan de Feltere em Övverbleck. Einzelheite sin en de
 13389+ 'abusefilter-log-header' => 'En däm Logboch he fingks De de Änderunge aan de Feltere em Övverbleck. Einzelheite sin en de
1339013390 [[Special:AbuseFilter/history|Leß met de neuste Änderunge aan Meßbruchsfeltere]].',
1339113391 'abusefilter-log-entry-modify' => 'hät $1 jeändert ($2)',
1339213392 'abusefilter-diff-title' => 'De Ungerscheide zwesche de Versione',
@@ -13461,7 +13461,7 @@
1346213462 Dës Spezialsäit weist eng Lëscht vun definéierte Filteren an erlaabt et dës z'änneren.",
1346313463 'abusefilter-mustbeeditor' => "Aus Sécherheetsgrënn kënnen nëmme Benotzer déi d'Recht hunn fir Mëssbrauchsfilteren z'änneren dësen Interface benotzen.",
1346413464 'abusefilter-warning' => "<big>'''Opgepasst'''</big>: Dës Aktioun gouf automatesch als geféierlech erkannt.
13465 -Ännerungen déi net konstruktiv si ginn automatesch zréckgsat,
 13465+Ännerungen déi net konstruktiv si ginn automatesch zréckgsat,
1346613466 a besonnesch schlëmmen oder widderhuelte Fäll gëtt Äre Benotzerkont oder Computer gespaart.
1346713467 Wann dir mengt datt Är Ännerung konstruktiv ass kënnt dir nachemol op \"Späichere\" klicken fir ze confirméieren.
1346813468 Eng kuerz Beschreiwung vun der Mëssbrauchsregel op déi Är Aktioun reagéiert huet: \$1",
@@ -14104,7 +14104,7 @@
1410514105 Controleer de truuk te dreie maotregele zorgvuldig, en klik "bevestig" óm dien selectie te bevestige.',
1410614106 'abusefilter-revert-confirm' => 'bevestig',
1410714107 'abusefilter-revert-success' => 'Doe höbs alle maotregele die door de misbroekfilter via [[Special:AbuseFilter/$1|filter $1]] zeen genomme truukgedreid.',
14108 - 'abusefilter-revert-reason' => 'Autematis truukdreie van alle maotregele door de misbroekfilter via filter $1.
 14108+ 'abusefilter-revert-reason' => 'Autematis truukdreie van alle maotregele door de misbroekfilter via filter $1.
1410914109 Raej: $2',
1411014110 'abusefilter-revert-reasonfield' => 'Raeje veur truukdreiing:',
1411114111 'abusefilter-test' => "Tes 'ne filter taenge eerdere bewirkinge",
@@ -14154,13 +14154,13 @@
1415514155 Jei Jūs manote, kad šis pakeitimas yra konstruktyvus, tai patvirtindami, Jūs galite pakartotinai paspausti butoną \"Išsaugoti\".
1415614156 Trumpas aprašymas piktnaudžiavimo taisyklės, kurią Jūsų veiksmas atitinka, yra: \$1",
1415714157 'abusefilter-disallowed' => 'Šis veiksmas buvo automatiškai identifikuotas kaip kenksmingas ir todėl jis buvo neleistas įvykdyti.
14158 -Jei Jūs galvojate, kad Jūsų pakeitimas buvo konstruktyvus, prašome susisiekti su administratoriumi ir informuoti jį apie tai ką Jūs bandėte daryti.
 14158+Jei Jūs galvojate, kad Jūsų pakeitimas buvo konstruktyvus, prašome susisiekti su administratoriumi ir informuoti jį apie tai ką Jūs bandėte daryti.
1415914159 Trumpas aprašymas piktnaudžiavimo taisyklės, kurią Jūsų veiksmas atitinka, yra: $1',
14160 - 'abusefilter-blocked-display' => 'Šis veiksmas buvo automatiškai identifikuotas kaip kenksmingas ir todėl jis buvo neleistas įvykdyti.
 14160+ 'abusefilter-blocked-display' => 'Šis veiksmas buvo automatiškai identifikuotas kaip kenksmingas ir todėl jis buvo neleistas įvykdyti.
1416114161 Papildomai, apsaugant {{SITENAME}}, Jūsų naudotojo sąskaita ir visi atitinkami IP adresai buvo blokuoti pakeitimų atlikimui.
14162 -Jei tai įvyko per klaidą, prašome susisiekti su administratoriumi.
 14162+Jei tai įvyko per klaidą, prašome susisiekti su administratoriumi.
1416314163 Trumpas aprašymas piktnaudžiavimo taisyklės, kurią Jūsų veiksmas atitinka, yra: $1',
14164 - 'abusefilter-degrouped' => 'Šis veiksmas buvo automatiškai identifikuotas kaip kenksmingas ir todėl jis buvo neleistas įvykdyti.
 14164+ 'abusefilter-degrouped' => 'Šis veiksmas buvo automatiškai identifikuotas kaip kenksmingas ir todėl jis buvo neleistas įvykdyti.
1416514165 Papildomai, kadangi susikompromitavo Jūsų naudotojo sąskaita, visos teisės buvo atimtos. Jei Jūs galvojate, kad tai įvyko per klaidą, prašome susisiekti su biurokratu, paaiškindami šią situaciją, tuomet Jūsų teisė bus atstatytos. Trumpas aprašymas piktnaudžiavimo taisyklės, kurią Jūsų veiksmas atitiko, yra: $1',
1416614166 'abusefilter-autopromote-blocked' => 'Šis veiksmas buvo automatiškai identifikuotas kaip kenksmingas ir todėl jis buvo neleistas įvykdyti.
1416714167 Papildomai, saugumo tikslais, Jūsų naudotojo sąskaitai leidžiamos privilegijuotos galimybės laikinai buvo panaikintos.
@@ -14197,8 +14197,8 @@
1419814198 'abusefilter-log-entry' => '$1: $2 iššaukė piktnaudžiavimo filtrą, atlikdamas veiksmą "$3" puslapiui $4.
1419914199 Buvo panaudotas veiksmas: $5;
1420014200 Filtro aprašymas: $6',
14201 - 'abusefilter-log-detailedentry-meta' => '$1: $2 iššaukė piktnaudžiavimo filtrą $3, atlikdamas veiksmą "$4" puslapiui $5.
14202 -Buvo panaudotas veiksmas: $6;
 14201+ 'abusefilter-log-detailedentry-meta' => '$1: $2 iššaukė piktnaudžiavimo filtrą $3, atlikdamas veiksmą "$4" puslapiui $5.
 14202+Buvo panaudotas veiksmas: $6;
1420314203 Filtro aprašymas: $7 ($8{{int:pipe-separator}}$9)',
1420414204 'abusefilter-log-detailedentry-global' => 'visuotinis filtras $1',
1420514205 'abusefilter-log-detailedentry-local' => 'filtras $1',
@@ -15490,7 +15490,7 @@
1549115491 Wenn du meenst, dat dor en Fehler passeert is, denn kannst du en Bürokraat schrieven un em de Saak verkloren. He kann di dien Brukerrechten weddergeven, wenn de Filter verkehrt legen hett.
1549215492 Dor liggt dat an, dat de Filter meckert: $1',
1549315493 'abusefilter-autopromote-blocked' => 'Diene Akschoon is dör en automaatschen Filter as negativ kennt worrn un is nich verlöövt.
15494 -Ut Sekerheitsgrünn sünd dorüm ok en poor vun de Brukerrechten intagen worrn, de Brukers kriegt, de länger dorbi sünd, un dien Brukerkonto warrt nu för en Tied eerst wedder so behannelt, as wenn du frisch dorbi büst.
 15494+Ut Sekerheitsgrünn sünd dorüm ok en poor vun de Brukerrechten intagen worrn, de Brukers kriegt, de länger dorbi sünd, un dien Brukerkonto warrt nu för en Tied eerst wedder so behannelt, as wenn du frisch dorbi büst.
1549515495 Dor liggt dat an, dat de Filter meckert: $1',
1549615496 'abusefilter-blocker' => 'Missbruuk-Filter',
1549715497 'abusefilter-blockreason' => 'Du büst dör en Missbruukfilter automaatsch sperrt worrn.
@@ -16681,11 +16681,11 @@
1668216682 'abusefilter-log-search-filter' => 'Filter-ID:',
1668316683 'abusefilter-log-search-title' => 'Tittel:',
1668416684 'abusefilter-log-search-submit' => 'Søk',
16685 - 'abusefilter-log-entry' => '$1: $2 utløste misbruksfilteret ved å gjøre en $3 på $4.
16686 -Reaksjon: $5;
 16685+ 'abusefilter-log-entry' => '$1: $2 utløste misbruksfilteret ved å gjøre en $3 på $4.
 16686+Reaksjon: $5;
1668716687 filterbeskrivelse: $6',
16688 - 'abusefilter-log-detailedentry-meta' => '$1: $2 utløste misbruksfilter $3, ved å gjøre en $4 på $5.
16689 -Reaksjon: $6;
 16688+ 'abusefilter-log-detailedentry-meta' => '$1: $2 utløste misbruksfilter $3, ved å gjøre en $4 på $5.
 16689+Reaksjon: $6;
1669016690 Filterbeskrivelse: $7 ($8{{int:pipe-separator}}$9)',
1669116691 'abusefilter-log-detailedentry-global' => 'globalt filter $1',
1669216692 'abusefilter-log-detailedentry-local' => 'filter $1',
@@ -17083,7 +17083,7 @@
1708417084 Accions presas : $5 ;
1708517085 Descripcion del filtre : $6",
1708617086 'abusefilter-log-detailedentry-meta' => "$1 : $2 a desenclavat lo $3, en executant l'accion « $4 » sur $5.
17087 -Accions presas : $6 ;
 17087+Accions presas : $6 ;
1708817088 Descripcion del filtre : $7 ($8{{int:pipe-separator}}$9)",
1708917089 'abusefilter-log-detailedentry-global' => 'filtre global $1',
1709017090 'abusefilter-log-detailedentry-local' => 'filtre $1 dels abuses',
@@ -17490,7 +17490,7 @@
1749117491 Interfejs pozwala przeglądać listę zdefiniowanych filtrów oraz pozwala na ich modyfikowanie.',
1749217492 'abusefilter-mustbeeditor' => 'Ze względów bezpieczeństwa z tego interfejsu mogą korzystać wyłącznie użytkownicy posiadający uprawnienie do zmieniania filtrów nadużyć.',
1749317493 'abusefilter-warning' => "<big>'''Uwaga'''</big>: Twoja edycja została automatycznie zidentyfikowana jako szkodliwa.
17494 -Niewłaściwe zmiany zostaną szybko wycofane,
 17494+Niewłaściwe zmiany zostaną szybko wycofane,
1749517495 a rażące lub powtarzające się niekonstruktywne edytowanie może spowodować zablokowanie Twojego konta lub adresu IP.
1749617496 Jeśli uważasz, że to co robisz ma uzasadnienie, kliknij przycisk „{{int:savearticle}}”, aby zatwierdzić zmiany.
1749717497 Krótki opis reguły nadużycia, do której Twoja akcji została dopasowana — $1",
@@ -17537,7 +17537,7 @@
1753817538 'abusefilter-log-search-filter' => 'ID filtru:',
1753917539 'abusefilter-log-search-title' => 'Tytuł strony',
1754017540 'abusefilter-log-search-submit' => 'Szukaj',
17541 - 'abusefilter-log-entry' => '$1: $2 uruchomił filtr nadużyć, wykonał „$3” na $4.
 17541+ 'abusefilter-log-entry' => '$1: $2 uruchomił filtr nadużyć, wykonał „$3” na $4.
1754217542 Podjęta akcja: $5.
1754317543 Opis filtru: $6',
1754417544 'abusefilter-log-detailedentry-meta' => '$1: $2 uruchomił $3, wykonał „$4” na $5.
@@ -19265,12 +19265,12 @@
1926619266 Эн оҥорбут дьайыыгын кытта ситимнэммит аһара түһүү кылгас ис хоһооно: \$1",
1926719267 'abusefilter-disallowed' => 'Бу дьайыы апатамаатынан омсолоох курдук бэлиэтэммит,
1926819268 онон бобуллубут.
19269 -Ол гынан баран, эн туһалаах көннөрүүнү оҥордум диэн эрэнэр буоллаххына, дьаһабылга тахсан тугу гынаары гынаргын кэпсээ.
 19269+Ол гынан баран, эн туһалаах көннөрүүнү оҥордум диэн эрэнэр буоллаххына, дьаһабылга тахсан тугу гынаары гынаргын кэпсээ.
1927019270 Эн оҥорбут дьайыыгын кытта ситимнэммит аһара түһүү кылгас ис хоһооно: $1',
1927119271 'abusefilter-blocked-display' => 'Бу дьайыы апатамаатынан омсолоох курдук бэлиэтэммит,
1927219272 онон оҥороруҥ бобуллубут.
1927319273 Ону таһынан {{SITENAME}} бырайыагы көмүскүүр соруктаах эн аатыҥ уонна IP-иҥ хааччахтаннылар.
19274 -Ол гынан баран, маны сыыһа дьаһал диир буоллаххына дьаһабылга таҕыс.
 19274+Ол гынан баран, маны сыыһа дьаһал диир буоллаххына дьаһабылга таҕыс.
1927519275 Эн оҥорбут дьайыыгын кытта ситимнэммит аһара түһүү кылгас ис хоһооно: $1',
1927619276 'abusefilter-degrouped' => 'Бу дьайыы апатамаатынан омсолоох курдук бэлиэтэммит,
1927719277 онон оҥороруҥ бобуллубут, аатыҥ бөрүкүтэ суох дьон тиһиктэригэр киирбит, туох баар бырааптара уһуллубут.
@@ -19280,7 +19280,7 @@
1928119281 Ону таһынан бырайыагы көмүскүүр соруктаах эн ааккыттан сорох бэлиэммит аакка бэриллэр эбии бырааптар сотуллубуттар.
1928219282 Эн оҥорбут дьайыыгын кытта ситимнэммит аһара түһүү кылгас ис хоһооно: $1',
1928319283 'abusefilter-blocker' => 'Омсолоох дьайыы фильтра',
19284 - 'abusefilter-blockreason' => 'Омсолоох дьайыы фильтра аптамаатынан хааччахтаабыт.
 19284+ 'abusefilter-blockreason' => 'Омсолоох дьайыы фильтра аптамаатынан хааччахтаабыт.
1928519285 Сөп түбэһэр сиэр-туом маннык: $1',
1928619286 'abusefilter-degroupreason' => 'Омсолоох туһаныыны хааччахтыыр фильтр бырааптаргын аптамаатынан былдьаабыт.
1928719287 Сиэр-туом маннык: $1',
@@ -19425,7 +19425,7 @@
1942619426 'abusefilter-edit-done' => '$1 сиидэҕэ уларытыы оҥорбутуҥ сөпкө бигэргэтилиннэ.',
1942719427 'abusefilter-edit-badsyntax' => 'Ыйыллыбыт сиидэҕэ синтаксис сыыһата булуллубут.
1942819428 Парсер бу биллэриини таһаарда: <pre>$1</pre>',
19429 - 'abusefilter-edit-restricted' => 'Бу сиидэни уларытар кыаҕыҥ суох, тоҕо диэтэххэ биир эбэтэр хас да хааччахтыыр дьайыылаах.
 19429+ 'abusefilter-edit-restricted' => 'Бу сиидэни уларытар кыаҕыҥ суох, тоҕо диэтэххэ биир эбэтэр хас да хааччахтыыр дьайыылаах.
1943019430 Бука диэн маны уларытар кыахтаах кыттааччыттан сиидэни эйиэхэ анаан уларытарыгар көрдөс.',
1943119431 'abusefilter-edit-viewhistory' => 'Бу сиидэ устуоруйатын көрдөр',
1943219432 'abusefilter-edit-history' => 'Устуоруйата:',
@@ -20585,7 +20585,7 @@
2058620586 Dessutom har några av ditt kontos rättigheter tillfälligt återkallats av säkerhetsskäl.
2058720587 En kortfattad beskrivning av missbruksregeln som din handling utlöste är: $1',
2058820588 'abusefilter-blocker' => 'Missbruksfilter',
20589 - 'abusefilter-blockreason' => 'Automatiskt blockerad av missbruksfiltret.
 20589+ 'abusefilter-blockreason' => 'Automatiskt blockerad av missbruksfiltret.
2059020590 Beskrivning av utlöst regel: $1',
2059120591 'abusefilter-degroupreason' => 'Behörigheter borttagna automatisk av missbruksfilter. Regelbeskrivning: $1',
2059220592 'abusefilter-accountreserved' => 'Detta konto är reserverat för användning av missbruksfiltret.',
@@ -20612,11 +20612,11 @@
2061320613 'abusefilter-log-search-filter' => 'Filter-ID:',
2061420614 'abusefilter-log-search-title' => 'Titel:',
2061520615 'abusefilter-log-search-submit' => 'Sök',
20616 - 'abusefilter-log-entry' => '$1: $2 utlöste ett missbruksfilter genom att göra handlingen "$3" på $4.
20617 -Utförd handling: $5;
 20616+ 'abusefilter-log-entry' => '$1: $2 utlöste ett missbruksfilter genom att göra handlingen "$3" på $4.
 20617+Utförd handling: $5;
2061820618 Filterbeskrivning: $6',
2061920619 'abusefilter-log-detailedentry-meta' => '$1: $2 utlöste $3, genom att göra handlingen "$4" på $5.
20620 -Utförd handling: $6;
 20620+Utförd handling: $6;
2062120621 Filterbeskrivning: $7 ($8{{int:pipe-separator}}$9)',
2062220622 'abusefilter-log-detailedentry-global' => 'globalt filter $1',
2062320623 'abusefilter-log-detailedentry-local' => 'filter $1',
@@ -21271,7 +21271,7 @@
2127221272 'abusefilter-status' => 'Soňky $1 {{PLURAL:$1|hereketden|hereketden}} $2 (%$3) sanysy $4 şert çägine baryp ýetdi, $5 (%$6) sanysy bolsa häzirki açyk filtrleriň birine gabat geldi.',
2127321273 'abusefilter-edit-subtitle' => '$1 filtri redaktirlenýär',
2127421274 'abusefilter-edit-status-label' => 'Statistikalar:',
21275 - 'abusefilter-edit-status' => 'Bu filtr soňky $1 {{PLURAL:$1|hereketden|hereketden}} $2 (%$3) sanysyna gabat geldi.
 21275+ 'abusefilter-edit-status' => 'Bu filtr soňky $1 {{PLURAL:$1|hereketden|hereketden}} $2 (%$3) sanysyna gabat geldi.
2127621276 Ortaça alnanda, işlän wagty $4ms, we onuň şert çägi $5 sany şerti sarp edýär.',
2127721277 'abusefilter-edit-throttled' => "'''Duýduryş''': Bu filtr howpsuzlyk çäresi hökmünde awtomatik ýapyldy.
2127821278 Ol hereketleriň %$1 sanysyndan artykmaç gabat gelme çägine baryp ýetdi.",
@@ -21497,11 +21497,11 @@
2149821498 Kung naganap ito dahil sa isang pagkakamali, makipag-ugnayan sa isang tagapangasiwa.
2149921499 Isang maiksing paglalarawan ng alituntunin sa pang-aabuso na tumugma sa kilos mo ang: $1',
2150021500 'abusefilter-degrouped' => 'Ang kilos na ito ay kusang nakilala bilang makakapinsala.
21501 -Bilang kinahinatnan, hindi ito pinahintulutan, at, dahil sa pinaghihinalaang nalantad sa kapahamakan ang kuwenta mo, pinawalan ng bisa ang lahat ng mga karapatan.
 21501+Bilang kinahinatnan, hindi ito pinahintulutan, at, dahil sa pinaghihinalaang nalantad sa kapahamakan ang kuwenta mo, pinawalan ng bisa ang lahat ng mga karapatan.
2150221502 Kung naniniwala kang isa itong pagkakamali, makipag-ugnayan sa isang burokrato na may isang paliwanag hinggil sa kilos na ito, at maaaring maibalik sa dati ang mga karapatan mo.
2150321503 Isang maiksing paglalarawan ng alituntunin sa pang-aabuso na tumugma sa kilos mo ang: $1',
2150421504 'abusefilter-autopromote-blocked' => 'Ang kilos na ito ay kusang nakilala bilang makakapinsala, at hindi ito pinahintulutan.
21505 -Bilang karagdagan, bilang isang pamamaraang pangkaligtasan, pansamantalang pinawalan ng bisa ang ilang mga pribilehiyong palagiang ibinibigay sa kinikilala nang mga akawnt.
 21505+Bilang karagdagan, bilang isang pamamaraang pangkaligtasan, pansamantalang pinawalan ng bisa ang ilang mga pribilehiyong palagiang ibinibigay sa kinikilala nang mga akawnt.
2150621506 Isang maiksing paglalarawan ng alituntunin sa pang-aabuso na tumugma sa kilos mo ang: $1',
2150721507 'abusefilter-blocker' => 'Pansala ng pang-aabuso',
2150821508 'abusefilter-blockreason' => 'Kusang hinadlangan ng pansala ng pang-aabuso. Paglalarawan ng tumugmang alituntunin: $1',
@@ -21528,8 +21528,8 @@
2152921529 'abusefilter-log-search-filter' => 'ID ng pansala:',
2153021530 'abusefilter-log-search-title' => 'Pamagat:',
2153121531 'abusefilter-log-search-submit' => 'Maghanap',
21532 - 'abusefilter-log-entry' => '$1: nagpagalaw si $2 ng isang pansala ng pang-aabuso, na nagsagawa ng $3 sa $4.
21533 -Mga kilos na ginawa: $5;
 21532+ 'abusefilter-log-entry' => '$1: nagpagalaw si $2 ng isang pansala ng pang-aabuso, na nagsagawa ng $3 sa $4.
 21533+Mga kilos na ginawa: $5;
2153421534 Paglalarawan ng pansala: $6',
2153521535 'abusefilter-log-detailedentry-meta' => '$1: nagpagalaw si $2 ng $3, na nagsagawa ng kilos na $4 sa $5. Mga kilos na ginawa: $6; Paglalarawan ng pansala: $7 ($8{{int:pipe-separator}}$9)',
2153621536 'abusefilter-log-detailedentry-global' => 'Pansalang pandaigdigang $1',
@@ -21849,8 +21849,8 @@
2185021850 'abusefilter-desc' => 'Değişikliklere otomatik bulucu yöntemler uygular',
2185121851 'abusefilter' => 'Değişiklik süzgeci yapılandırması',
2185221852 'abuselog' => 'Süzgeç kayıtları',
21853 - 'abusefilter-intro' => 'Değişiklik Süzgeci yönetim arayüzüne hoş geldiniz.
21854 -Değişiklik Süzgeci, tüm eylemlere otomatik bulucu yöntemler uygulayan otomatik bir yazılım mekanizmasıdır.
 21853+ 'abusefilter-intro' => 'Değişiklik Süzgeci yönetim arayüzüne hoş geldiniz.
 21854+Değişiklik Süzgeci, tüm eylemlere otomatik bulucu yöntemler uygulayan otomatik bir yazılım mekanizmasıdır.
2185521855 Bu arayüz, tanımlı süzgeçlerin listesini gösterir ve değiştirilmelerine olanak sağlar.',
2185621856 'abusefilter-mustbeeditor' => 'Güvenlik nedeniyle, bu arayüzü sadece suistimal filtrelerini değiştirme yetkisine sahip kullanıcılar kullanabilir.',
2185721857 'abusefilter-warning' => "<big>'''Uyarı'''</big>: Bu eylem otomatikman zararlı olarak tanımlanmıştır.
@@ -24675,4 +24675,3 @@
2467624676 'abusefilter-edit-builder-vars-movedfrom-id' => '要移動的源頁面頁面ID',
2467724677 'abusefilter-edit-builder-vars-movedfrom-ns' => '要移動的源名字空間',
2467824678 );
24679 -
Index: trunk/extensions/AbuseFilter/AbuseFilter.hooks.php
@@ -3,10 +3,8 @@
44 die();
55
66 class AbuseFilterHooks {
7 -
87 // So far, all of the error message out-params for these hooks accept HTML.
98 // Hooray!
10 -
119 public static function onEditFilterMerged( $editor, $text, &$error, $summary ) {
1210 // Load vars
1311 $vars = new AbuseFilterVariableHolder;
@@ -42,7 +40,7 @@
4341
4442 $filter_result = AbuseFilter::filterAction( $vars, $editor->mTitle );
4543
46 - if( $filter_result !== true ){
 44+ if ( $filter_result !== true ) {
4745 global $wgOut;
4846 $wgOut->addHTML( $filter_result );
4947 $editor->showEditForm();
@@ -111,7 +109,7 @@
112110 $vars->setVar( 'ACTION', 'createaccount' );
113111 $vars->setVar( 'ACCOUNTNAME', $user->getName() );
114112
115 - $filter_result = AbuseFilter::filterAction(
 113+ $filter_result = AbuseFilter::filterAction(
116114 $vars, SpecialPage::getTitleFor( 'Userlogin' ) );
117115
118116 $message = $filter_result;
@@ -121,17 +119,17 @@
122120
123121 public static function onRecentChangeSave( $recentChange ) {
124122 $title = Title::makeTitle(
125 - $recentChange->mAttribs['rc_namespace'],
 123+ $recentChange->mAttribs['rc_namespace'],
126124 $recentChange->mAttribs['rc_title']
127125 );
128 - $action = $recentChange->mAttribs['rc_log_type'] ?
 126+ $action = $recentChange->mAttribs['rc_log_type'] ?
129127 $recentChange->mAttribs['rc_log_type'] : 'edit';
130128 $actionID = implode( '-', array(
131129 $title->getPrefixedText(), $recentChange->mAttribs['rc_user_text'], $action
132130 ) );
133131
134 - if ( !empty( AbuseFilter::$tagsToSet[$actionID] )
135 - && count( $tags = AbuseFilter::$tagsToSet[$actionID] ) )
 132+ if ( !empty( AbuseFilter::$tagsToSet[$actionID] )
 133+ && count( $tags = AbuseFilter::$tagsToSet[$actionID] ) )
136134 {
137135 ChangeTags::addTags(
138136 $tags,
@@ -145,19 +143,19 @@
146144 }
147145
148146 public static function onListDefinedTags( &$emptyTags ) {
149 - ## This is a pretty awful hack.
 147+ # This is a pretty awful hack.
150148 $dbr = wfGetDB( DB_SLAVE );
151149
152150 $res = $dbr->select(
153151 array( 'abuse_filter_action', 'abuse_filter' ),
154 - 'afa_parameters',
 152+ 'afa_parameters',
155153 array( 'afa_consequence' => 'tag', 'af_enabled' => true ),
156154 __METHOD__,
157155 array(),
158156 array( 'abuse_filter' => array( 'INNER JOIN', 'afa_filter=af_id' ) )
159157 );
160158
161 - while( $row = $res->fetchObject() ) {
 159+ while ( $row = $res->fetchObject() ) {
162160 $emptyTags = array_filter(
163161 array_merge( explode( "\n", $row->afa_parameters ), $emptyTags )
164162 );
@@ -172,7 +170,7 @@
173171 $dir = dirname( __FILE__ );
174172
175173 // DB updates
176 - if( $wgDBtype == 'mysql' ) {
 174+ if ( $wgDBtype == 'mysql' ) {
177175 $wgExtNewTables[] = array( 'abuse_filter', "$dir/abusefilter.tables.sql" );
178176 $wgExtNewTables[] = array( 'abuse_filter_history', "$dir/db_patches/patch-abuse_filter_history.sql" );
179177 $wgExtNewFields[] = array( 'abuse_filter_history', 'afh_changed_fields', "$dir/db_patches/patch-afh_changed_fields.sql" );
@@ -201,7 +199,7 @@
202200 public static function onContributionsToolLinks( $id, $nt, &$tools ) {
203201 global $wgUser;
204202 wfLoadExtensionMessages( 'AbuseFilter' );
205 - if( $wgUser->isAllowed( 'abusefilter-log' ) ) {
 203+ if ( $wgUser->isAllowed( 'abusefilter-log' ) ) {
206204 $sk = $wgUser->getSkin();
207205 $tools[] = $sk->link(
208206 SpecialPage::getTitleFor( 'AbuseLog' ),
Index: trunk/extensions/AbuseFilter/phpTest.php
@@ -1,5 +1,4 @@
22 <?php
3 -
43 /**
54 * Runs tests against the PHP parser.
65 */
@@ -18,8 +17,8 @@
1918 $check = 0;
2019 $pass = 0;
2120
22 -foreach( $tests as $test ) {
23 - $result = substr( $test, 0, -2 ) . ".r";
 21+foreach ( $tests as $test ) {
 22+ $result = substr( $test, 0, - 2 ) . ".r";
2423
2524 $rule = trim( file_get_contents( $test ) );
2625 $output = ( $cont = trim( file_get_contents( $result ) ) ) == 'MATCH';

Status & tagging log