Jump to content

User:松/Drafts/Extension:AbuseFilter/Rules format: Difference between revisions

no edit summary
(Translation code removal)
No edit summary
Line 559:
|}
 
<translate>
=== Notes === <!--T:264-->
 
=== Notes === <!--T:264-->
<!--T:265-->
 
When <tvar|1><code>action='move'</code></>, only the <tvar|2><code>summary</code></>, <tvar|3><code>action</code></>, <tvar|4><code>timestamp</code></> and <tvar|5><code>user_*</code></> variables are available.</translate>
<translate>
<!--T:266-->
Line 594 ⟶ 593:
 
{{anchor|Performance}}
<translate>
=== Performance === <!--T:275-->
 
=== Performance === <!--T:275-->
<!--T:276-->
 
As noted in the table above, some of these variables can be very slow.</translate>
<translate>
<!--T:277-->
Line 623 ⟶ 621:
<!--T:285-->
* In general, when dealing with these variables, it's always much better to consume further conditions but avoid computing heavy stuff.</translate> <translate><!--T:286--> In order to achieve this, always put heavy variables as last conditions.</translate>
<translate><!--T:287--> Last but not least, note that whenever a variable is computed for a given filter, it'll be saved and any other filter will immediately retrieve it.</translate>This <translate><!--T:288-->means that one single filter computing this variable counts more or less as dozens of filters using it.
 
This means that one single filter computing this variable counts more or less as dozens of filters using it.
== Keywords == <!--T:289-->
 
== Keywords == <!--T:289-->
</translate>
{{note|1=<translate><!--T:290--> Where not specifically stated, keywords cast their operands to strings</translate>}}
<translate>
Line 692 ⟶ 689:
|}
 
== Functions == <!--T:306-->
<translate>
== Functions == <!--T:306-->
 
A number of built-in functions are included to ease some common issues.They are executed in the general format <tvar|1><code>functionName( arg1, arg2, arg3 )</code></>, and can be used in place of any literal or variable.</translate>Its arguments can be given as literals, variables, or even other functions.
<!--T:307-->
A number of built-in functions are included to ease some common issues.</translate>
<translate>
<!--T:308-->
They are executed in the general format <tvar|1><code>functionName( arg1, arg2, arg3 )</code></>, and can be used in place of any literal or variable.</translate>
<translate>
<!--T:309-->
Its arguments can be given as literals, variables, or even other functions.
</translate>
 
{| class="wikitable sortable"
Line 767 ⟶ 755:
|}
 
=== Examples === <!--T:364-->
<translate>
 
=== Examples === <!--T:364-->
</translate>
<!--Note: these examples are also used in https://phabricator.wikimedia.org/diffusion/EABF/browse/master/tests/parserTests/mwexamples-functions.t -->
{| class="wikitable"
Line 861 ⟶ 848:
|}
 
== Order of operations == <!--T:370-->
<translate>
== Order of operations == <!--T:370-->
 
Operations are generally done left-to-right, but there is an order to which they are resolved.</translate>
<!--T:371-->
Operations are generally done left-to-right, but there is an order to which they are resolved.</translate>
<translate>
<!--T:372-->
Line 886 ⟶ 871:
# <translate><!--T:384--> Boolean operations.</translate> (<code>&</code>, <code>|</code>, <code>^</code>)
 
=== Examples === <!--T:385-->
<translate>
 
=== Examples === <!--T:385-->
</translate>
* <translate><!--T:386--> <tvar|1><code>A & B | C</code></> is equivalent to <tvar|2><code>(A & B) | C</code></>, not to <tvar|3><code>A & (B | C)</code></>.</translate> <translate><!--T:387--> In particular, both <tvar|1><code>false & true '''| true'''</code></> and <tvar|2><code>false & false '''| true'''</code></> evaluates to <tvar|3><code>true</code></>.</translate>
* <translate><!--T:388--> <tvar|1><code>A | B & C</code></> is equivalent to <tvar|2><code>(A | B) & C</code></>, not to <tvar|3><code>A | (B & C)</code></>.</translate> <translate><!--T:389--> In particular, both <tvar|1><code>true | true '''& false'''</code></> and <tvar|2><code>true | false '''& false'''</code></> evaluates to <tvar|3><code>false</code></>.</translate>
222

edits

Cookies help us deliver our services. By using our services, you agree to our use of cookies.