r48570 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r48569‎ | r48570 | r48571 >
Date:05:11, 19 March 2009
Author:werdna
Status:ok
Tags:
Comment:
Document contains, ternery operator and conditionals
Modified paths:
  • /trunk/extensions/AbuseFilter/AbuseFilter.class.php (modified) (history)
  • /trunk/extensions/AbuseFilter/AbuseFilter.i18n.php (modified) (history)

Diff [purge]

Index: trunk/extensions/AbuseFilter/AbuseFilter.class.php
@@ -46,9 +46,12 @@
4747 ),
4848 'misc' => array(
4949 'in' => 'in',
 50+ 'contains' => 'contains',
5051 'like' => 'like',
5152 '""' => 'stringlit',
52 - 'rlike' => 'rlike'
 53+ 'rlike' => 'rlike',
 54+ 'cond ? iftrue : iffalse' => 'tern',
 55+ 'if cond then iftrue else iffalse end' => 'cond',
5356 ),
5457 'funcs' => array(
5558 'length(string)' => 'length',
Index: trunk/extensions/AbuseFilter/AbuseFilter.i18n.php
@@ -230,7 +230,10 @@
231231 'abusefilter-edit-builder-misc-in' => 'contained in string (in)',
232232 'abusefilter-edit-builder-misc-like' => 'Matches pattern (like)',
233233 'abusefilter-edit-builder-misc-rlike' => 'Matches regex (rlike)',
 234+ 'abusefilter-edit-builder-misc-contains' => 'Left string contains right string (contains)',
234235 'abusefilter-edit-builder-misc-stringlit' => 'String literal ("")',
 236+ 'abusefilter-edit-builder-misc-tern' => 'Ternery operator (X ? Y : Z)',
 237+ 'abusefilter-edit-builder-misc-cond' => 'Conditional (if X then Y else Z)',
235238 'abusefilter-edit-builder-group-funcs' => 'Functions',
236239 'abusefilter-edit-builder-funcs-length' => 'String length (length)',
237240 'abusefilter-edit-builder-funcs-lcase' => 'To lower case (lcase)',

Status & tagging log