Page MenuHomePhabricator

When using + append operator, rlike checks each individual string instead of the combined one
Closed, ResolvedPublic

Description

See e.g. [[q:it:Speciale:AbuseFilter/examine/310666]] (feel free to temporarily add yourself to local sysop group, if you want) i.e. http://it.wikiquote.org/?diff=304888 :
(new_wikitext rlike ("===? *Senza fonte *===?[^=]+" + added_lines))
gives false while it's expected to give true (and it seems to do so if added_lines is one line only, e.g. here: http://it.wikiquote.org/w/index.php?title=Speciale:AbuseLog&details=179 : if this is the correct behaviour change bug summary), but if you remove parenthesis it always gives true, even if you check
(new_wikitext rlike "nonexistentstring" + "===? *Senza fonte *===?[^=]+")
or
(new_wikitext rlike "===? *Senza fonte *===?[^=]+" + "nonexistentstring")


Version: unspecified
Severity: normal

Details

Reference
bz22220

Event Timeline

bzimport raised the priority of this task from to Low.Nov 21 2014, 10:52 PM
bzimport added a project: AbuseFilter.
bzimport set Reference to bz22220.
bzimport added a subscriber: Unknown Object (MLST).
Daimona claimed this task.
Daimona subscribed.

This works as expected right now: added_lines irlike "foobar" is equal to added_lines irlike ( "foo" + "bar" ). However, added_lines irlike "foo" + "bar" is not the way to write this since, if I'm right, operations are associative on the left. Finally, if the problem was strictly related to added_lines itself, T52107 would be the right place.