* Defer the slow profiling updates to post-send
* Convert to the object stash, so that all DCs see
the same values
Change-Id: I08316c6a3192bd69248cf5ab5a3ed8185341c313
$params[0] is the full prefixed page title, with namespace.
$params[1] is whether the move was with or without a redirect.
Bug: T121963
Change-Id: I880bb227f2fc97394a68187e7b8391acf5aeaf5e
We were only recording the total number of conditions used by all filters,
then treating it as if it was the per-filter number, resulting in crazy
stupid values. We were also not clearing this when a filter was edited.
(This does not fix the remaining problems mentioned on the task.)
Bug: T53294
Change-Id: I4f9f88f94469b977fe60c554b76e94edacac3462
Follow-up to b60829a60c.
I'll fix up message translations on Translatewiki when this is merged.
Bug: T132189
Change-Id: I1ecaedd7489b264ed621309b6fbfb63b9287a437
This reverts commit afb78deb84.
I'll guard this behind a global and fix up the localisation messages
in a separate commit. This is a straight revert.
Bug: T132189
Change-Id: Iff4aa6d7d543db8f47c5f81f3c206dafcd5373dc
* file_mime
The MIME type of the file, e.g. 'image/png'.
* file_mediatype
The media type of the file, one of 'UNKNOWN', 'BITMAP', 'DRAWING',
'AUDIO', 'VIDEO', 'MULTIMEDIA', 'OFFICE', 'TEXT', 'EXECUTABLE', 'ARCHIVE'.
* file_width
Width of the image in pixels, or 0 if it's inapplicable (e.g. for
audio files).
* file_height
Height of the image in pixels, or 0 if it's inapplicable (e.g. for
audio files).
* file_bits_per_channel
Bits per color channel of the image, or 0 if it's inapplicable (e.g.
for audio files). The most common value is 8.
Bug: T131643
Change-Id: Id355515a18d3674393332c0f4094e34f9f522623
Also
* Fix a bug where action-reverts doesn't work for anons
since the userid is always 0 for them, instead use the username.
* Start adding block log flags consistently with core
Bug: T124789
Change-Id: Ic6680dad891e2169b392fcfefc1e313af85bc92f
It'll be logging info for an anonymous user anyway, this just makes it
explicit.
Bug: T124367
Change-Id: I3c221d9af26b57b83e1be4db1698ca99fed9093c
Depends-On: I0b018a623fc833ca95d249ee21667a8f5690d50e
This was just set the present time anyway and this
code is called from EditFilterMergedContent, before
the edit in question was saved either.
Bug: T116557
Change-Id: I2f84cff0ad4f65b6c2572a89a267cf42d4a96f94
* This is very slow as there can easily be hundreds of filters,
each doing 6 memcached queries. Xenon flamegraphs show a lot
of time spent in this method, slowing down editing.
Change-Id: I31e4502bbd45cc284db3cd89eb34ad365c59905b
* Also removed some code duplication
* Use getConnectionRef in checkAllFilters so that the
DB connection can be reused
Bug: T93141
Change-Id: I17c5a976b6c45029cde4ed34ad82d69e365ae8c5
When importing filters, the code is using the magic value
of 'new' for the af_id field, which is of type bigint, to
indicate a not-yet-inserted record.
In MySQL, comparing a bigint to 'new' is legal but always false,
while in PostgreSQL it is illegal, and led to errors when checking
if the filter is hidden.
Fix this by adding special-case code to filterHidden so that it
always returns false for 'new' records. In PostgreSQL this fixes
the error, and in MySQL it avoids a pointless trip to the database.
Should be back patched to 1.23 and 1.24
Bug: T89514
Change-Id: Ib4b5585ac9889a1760ec930c555e7809a424538e
Allows for more broad filters to check for a given right, rather
than having to check against multiple groups, which becomes useful
with global groups.
Bug: 60191
Change-Id: I95b5477d6d868d4b83bcd98e779e6d535aa755b3
If multiple filters all add tags to an edit, make all of them be added
rather than just one of them.
Bug: 66387
Change-Id: Ib666c2765718d7d0603921ab94d22a7d51cbd3d2
* Due to the nature of this code (a throttle) it will likely slam the DB,
so push it after the end of the main transaction.
bug: 60600
Change-Id: I48895358deaa1b951d849eeee14c7126cfa25ec8
The text areas for the table row had only 5 rows, which is a lot less than
the default number of rows.So now the number of rows in the testing textarea is changed to 15.
Bug: 59869
Change-Id: I9f221e7a49473ae1d473333f7ecf26235366d257
I'm not really sure why it exists; I assume to minimize overhead of init'ing
multiple AbuseFilterParser objects that would be exactly the same.
However, checkConditions() - which checks one specific condition - is not really
an "endpoint" you will want to call in <your-extension-that-uses-AbuseFilter>.
You're more likely to call something higher-lever (like
AbuseFilter::filterAction, which will take care of fetching all appropriate
filters, as well as run them through checkConditions, and much more). This will
trickle down to ::checkAllFilter, down to ::checkFilter, which would eventually
call ::checkConditions with the 'keepvars' argument.
Basically, unless you're re-implementing much of AbuseFilter yourself, you won't
get to pass anything other than 'keepvars' to checkFilter.
As a result, even though you may call AbuseFilter to call on multiple different
vars, it will re-use the same parser with the first vars.
I'm proposing to drop the 'keepvars' and just keep the vars around instead.
checkFilter can compare previous vars with new vars, and only init a new Parser
if the vars are different.
Change-Id: I96ccc60c77f3cdbb82c0f9f16782a1a44ffb1592