r49353 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r49352‎ | r49353 | r49354 >
Date:20:45, 9 April 2009
Author:ialex
Status:ok
Tags:
Comment:
svn:eol-style native
Modified paths:
  • /trunk/extensions/AbuseFilter/tests/arrays.r (modified) (history)
  • /trunk/extensions/AbuseFilter/tests/arrays.t (modified) (history)
  • /trunk/extensions/AbuseFilter/tests/vars.r (modified) (history)
  • /trunk/extensions/AbuseFilter/tests/vars.t (modified) (history)
  • /trunk/extensions/AbuseFilter/tests/wptest1.r (modified) (history)
  • /trunk/extensions/AbuseFilter/tests/wptest1.t (modified) (history)
  • /trunk/extensions/AbuseFilter/tests/wptest2.r (modified) (history)
  • /trunk/extensions/AbuseFilter/tests/wptest2.t (modified) (history)
  • /trunk/extensions/AbuseFilter/tests/wptest3.r (modified) (history)
  • /trunk/extensions/AbuseFilter/tests/wptest3.t (modified) (history)
  • /trunk/extensions/DataTransfer/includes/DT_ImportJob.php (modified) (history)
  • /trunk/extensions/DataTransfer/includes/DT_XMLParser.php (modified) (history)
  • /trunk/extensions/DataTransfer/specials/DT_ImportXML.php (modified) (history)
  • /trunk/extensions/MetavidWiki/skins/mv_embed/libAddMedia/searchLibs/baseRemoteSearch.js (modified) (history)

Diff [purge]

Property changes on: trunk/extensions/DataTransfer/specials/DT_ImportXML.php
___________________________________________________________________
Name: svn:eol-style
11 + native
Property changes on: trunk/extensions/DataTransfer/includes/DT_ImportJob.php
___________________________________________________________________
Name: svn:eol-style
22 + native
Property changes on: trunk/extensions/DataTransfer/includes/DT_XMLParser.php
___________________________________________________________________
Name: svn:eol-style
33 + native
Property changes on: trunk/extensions/MetavidWiki/skins/mv_embed/libAddMedia/searchLibs/baseRemoteSearch.js
___________________________________________________________________
Name: svn:eol-style
44 + native
Index: trunk/extensions/AbuseFilter/tests/wptest1.r
@@ -1 +1 @@
2 -MATCH
 2+MATCH
Property changes on: trunk/extensions/AbuseFilter/tests/wptest1.r
___________________________________________________________________
Name: svn:eol-style
33 + native
Index: trunk/extensions/AbuseFilter/tests/wptest2.r
@@ -1 +1 @@
2 -MATCH
 2+MATCH
Property changes on: trunk/extensions/AbuseFilter/tests/wptest2.r
___________________________________________________________________
Name: svn:eol-style
33 + native
Index: trunk/extensions/AbuseFilter/tests/wptest3.r
@@ -1 +1 @@
2 -MATCH
 2+MATCH
Property changes on: trunk/extensions/AbuseFilter/tests/wptest3.r
___________________________________________________________________
Name: svn:eol-style
33 + native
Index: trunk/extensions/AbuseFilter/tests/wptest1.t
@@ -1,9 +1,9 @@
2 -/* Filter 30 from English Wikipedia (large deletion from article by new editors) */
3 -user_groups_test := ["*"];
4 -new_size_test := 100;
5 -article_namespace_test := 0;
6 -edit_delta_test := -5000;
7 -added_lines_test := '';
8 -
9 -!("autoconfirmed" in user_groups_test) & (new_size_test > 50) & (article_namespace_test == 0) &
10 - (edit_delta_test < -2000) & !("#redirect" in lcase(added_lines_test))
 2+/* Filter 30 from English Wikipedia (large deletion from article by new editors) */
 3+user_groups_test := ["*"];
 4+new_size_test := 100;
 5+article_namespace_test := 0;
 6+edit_delta_test := -5000;
 7+added_lines_test := '';
 8+
 9+!("autoconfirmed" in user_groups_test) & (new_size_test > 50) & (article_namespace_test == 0) &
 10+ (edit_delta_test < -2000) & !("#redirect" in lcase(added_lines_test))
Property changes on: trunk/extensions/AbuseFilter/tests/wptest1.t
___________________________________________________________________
Name: svn:eol-style
1111 + native
Index: trunk/extensions/AbuseFilter/tests/wptest2.t
@@ -1,21 +1,21 @@
2 -/* Filter 61 from English Wikipedia (new user removing references) */
3 -user_groups_test := ["*"];
4 -new_size_test := 100;
5 -article_namespace_test := 0;
6 -edit_delta_test := -22;
7 -added_lines_test := ['<ref name="bah">test</ref> test2!'];
8 -removed_lines_test := ['<ref name="bah">test</ref><ref name="wah">test2</ref>'];
9 -
10 -!("autoconfirmed" in user_groups_test)
11 -/* this edit_delta ignores large blankings that are treated by another filter */
12 -& edit_delta_test >= -1000
13 -& article_namespace_test == 0
14 -/* No added lines usually mean a blanking which is dealt with by other filter */
15 -& length(added_lines_test) != 0
16 -& !("#redirect" in lcase(added_lines_test))
17 -/*Counts of more reference tags are removed than added */
18 -& (rcount("(<ref>|<ref\sname|</ref>)",removed_lines_test) > rcount("(<ref>|<ref\sname|</ref>)",added_lines_test))
19 -/*Excludes changing to the named reference format and removing closing tags attached to formerly named refs. Unequality is to account for closing the first named tag */
20 -& !(rcount("<ref>",removed_lines_test) = rcount("<ref\sname",added_lines_test) | rcount("</ref>",removed_lines_test) <= rcount("<ref\sname",added_lines_test))
21 -/*Excludes removal of references to Wikipedia itself */
22 -& !(count("http://en.wikipedia.org",string(removed_lines_test)) > count("http://en.wikipedia.org",string(added_lines_test)))
 2+/* Filter 61 from English Wikipedia (new user removing references) */
 3+user_groups_test := ["*"];
 4+new_size_test := 100;
 5+article_namespace_test := 0;
 6+edit_delta_test := -22;
 7+added_lines_test := ['<ref name="bah">test</ref> test2!'];
 8+removed_lines_test := ['<ref name="bah">test</ref><ref name="wah">test2</ref>'];
 9+
 10+!("autoconfirmed" in user_groups_test)
 11+/* this edit_delta ignores large blankings that are treated by another filter */
 12+& edit_delta_test >= -1000
 13+& article_namespace_test == 0
 14+/* No added lines usually mean a blanking which is dealt with by other filter */
 15+& length(added_lines_test) != 0
 16+& !("#redirect" in lcase(added_lines_test))
 17+/*Counts of more reference tags are removed than added */
 18+& (rcount("(<ref>|<ref\sname|</ref>)",removed_lines_test) > rcount("(<ref>|<ref\sname|</ref>)",added_lines_test))
 19+/*Excludes changing to the named reference format and removing closing tags attached to formerly named refs. Unequality is to account for closing the first named tag */
 20+& !(rcount("<ref>",removed_lines_test) = rcount("<ref\sname",added_lines_test) | rcount("</ref>",removed_lines_test) <= rcount("<ref\sname",added_lines_test))
 21+/*Excludes removal of references to Wikipedia itself */
 22+& !(count("http://en.wikipedia.org",string(removed_lines_test)) > count("http://en.wikipedia.org",string(added_lines_test)))
Property changes on: trunk/extensions/AbuseFilter/tests/wptest2.t
___________________________________________________________________
Name: svn:eol-style
2323 + native
Index: trunk/extensions/AbuseFilter/tests/wptest3.t
@@ -1,28 +1,28 @@
2 -/* Filter 18 from English Wikipedia (test type edits from clicking on edit bar) */
3 -user_groups_test := ["*"];
4 -article_namespace_test := 0;
5 -added_lines_test := ["Hello world! '''Bold text''' [http://www.example.com link title]"];
6 -
7 -(article_namespace_test == 0) &
8 -!("autoconfirmed" in user_groups_test) &
9 -(contains_any(string(added_lines_test),
10 - "'''Bold text'''",
11 - "''Italic text''",
12 - "[[Link title]]",
13 - "[http://www.example.com link title]",
14 - "== Headline text ==",
15 - "[[File:Example.jpg]]",
16 - "[[Media:Example.ogg]]",
17 - "<math>Insert formula here</math>",
18 - "<nowiki>Insert non-formatted text here</nowiki>",
19 - "#REDIRECT [[Target page name]]",
20 - "<s>Strike-through text</s>",
21 - "<sup>Superscript text</sup>",
22 - "<sub>Subscript text</sub>",
23 - "<small>Small Text</small>",
24 - "<!-- Comment -->",
25 - "Image:Example.jpg|Caption",
26 - "<ref>Insert footnote text here</ref>",
27 - "Ǣ ǣ ǖ ǘ ǚ ǜ Ă"
28 -))
29 -
 2+/* Filter 18 from English Wikipedia (test type edits from clicking on edit bar) */
 3+user_groups_test := ["*"];
 4+article_namespace_test := 0;
 5+added_lines_test := ["Hello world! '''Bold text''' [http://www.example.com link title]"];
 6+
 7+(article_namespace_test == 0) &
 8+!("autoconfirmed" in user_groups_test) &
 9+(contains_any(string(added_lines_test),
 10+ "'''Bold text'''",
 11+ "''Italic text''",
 12+ "[[Link title]]",
 13+ "[http://www.example.com link title]",
 14+ "== Headline text ==",
 15+ "[[File:Example.jpg]]",
 16+ "[[Media:Example.ogg]]",
 17+ "<math>Insert formula here</math>",
 18+ "<nowiki>Insert non-formatted text here</nowiki>",
 19+ "#REDIRECT [[Target page name]]",
 20+ "<s>Strike-through text</s>",
 21+ "<sup>Superscript text</sup>",
 22+ "<sub>Subscript text</sub>",
 23+ "<small>Small Text</small>",
 24+ "<!-- Comment -->",
 25+ "Image:Example.jpg|Caption",
 26+ "<ref>Insert footnote text here</ref>",
 27+ "Ǣ ǣ ǖ ǘ ǚ ǜ Ă"
 28+))
 29+
Property changes on: trunk/extensions/AbuseFilter/tests/wptest3.t
___________________________________________________________________
Name: svn:eol-style
3030 + native
Index: trunk/extensions/AbuseFilter/tests/vars.r
@@ -1 +1 @@
2 -MATCH
 2+MATCH
Property changes on: trunk/extensions/AbuseFilter/tests/vars.r
___________________________________________________________________
Name: svn:eol-style
33 + native
Index: trunk/extensions/AbuseFilter/tests/vars.t
@@ -1,5 +1,5 @@
2 -/* Variables test */
3 -test_var1 := test_var2 := "aa";
4 -set( 'ResulT', set_var( 'TV3', "bb" ) );
5 -
 2+/* Variables test */
 3+test_var1 := test_var2 := "aa";
 4+set( 'ResulT', set_var( 'TV3', "bb" ) );
 5+
66 str_replace( test_var1, test_var2, tv3 ) == result;
\ No newline at end of file
Property changes on: trunk/extensions/AbuseFilter/tests/vars.t
___________________________________________________________________
Name: svn:eol-style
77 + native
Index: trunk/extensions/AbuseFilter/tests/arrays.r
@@ -1 +1 @@
2 -MATCH
 2+MATCH
Property changes on: trunk/extensions/AbuseFilter/tests/arrays.r
___________________________________________________________________
Name: svn:eol-style
33 + native
Index: trunk/extensions/AbuseFilter/tests/arrays.t
@@ -1,12 +1,12 @@
2 -array1 := [ 'a', 'b', 'c', ];
3 -array2 := [];
4 -array2[] := 'd';
5 -array2[] := 'g';
6 -array2[] := 'f';
7 -array2[1] := 'e';
8 -
9 -array3 := array1 + array2;
10 -array4 := [ [ 1, 2, 3 ], [ 4, 5, 6 ] ];
11 -
12 -(string(array3) == "a\nb\nc\nd\ne\nf" & !('b' in array2) & array1 contains 'c' & [ false, !(1;0), null ][1] & length(array3) == 6 &
 2+array1 := [ 'a', 'b', 'c', ];
 3+array2 := [];
 4+array2[] := 'd';
 5+array2[] := 'g';
 6+array2[] := 'f';
 7+array2[1] := 'e';
 8+
 9+array3 := array1 + array2;
 10+array4 := [ [ 1, 2, 3 ], [ 4, 5, 6 ] ];
 11+
 12+(string(array3) == "a\nb\nc\nd\ne\nf" & !('b' in array2) & array1 contains 'c' & [ false, !(1;0), null ][1] & length(array3) == 6 &
1313 array4[1][1] == 5 )
\ No newline at end of file
Property changes on: trunk/extensions/AbuseFilter/tests/arrays.t
___________________________________________________________________
Name: svn:eol-style
1414 + native

Status & tagging log