Cleanup:
- Trim the field value before trying to load the filter
- Add the pattern to the box using .val() instead of .text(), to
update the content even if the user has made changes to it
Bug: 51402
Change-Id: I4ae671941571dce206448424f8e996cb99ac8d41
Global AbuseFilters will be searchable using "global-123"
with this. Furthermore this patch fixes the visibility of
global AbuseFilter ids within the API module.
Bug: 51007
Change-Id: Ia6caba5ae3d727b778076ecdba500b4dc1d55b6f
We shouldn't try to set the attribute of a variable which isn't
actually an object as this will lead to the "Creating default
object from empty value" PHP error and it will trigger a further
fatal down the road. This gets triggered in Wikibase and probably
other extension unit tests.
Change-Id: I0f2e93657e5cfdb84ee351be371d421c11291b82
Right now the extension tries to link a local page
with the given title if the user can't see filter
details instead of linking to the correct page on
the target wiki.
Change-Id: I6bd2ecc48d1c248655ed41fc5ba9e9f286037adc
AbuseFilter::getConsequencesForFilters uses filter ids as
array keys, that causes problems if both local and global
filters were hit, because array_merge reindexes arrays.
Example:
https://www.mediawiki.org/wiki/Special:AbuseLog/18687
Change-Id: I81cb110322461e30113199cfa313cd8e8e8b2262
I've also added myself to the credits file as I'm the only
maintainer of this extension for a while now.
Change-Id: Id998172ea2abd70b8243de9db1a96cc2cfa47a64
This prevents an abuse filter admin from setting a custom warning
message (which are references to a non-translated, local wiki page),
for global filters (which can be on any wiki in any language).
bug: 45164
Change-Id: If61716053b75f45e4b70f78d3809ddd02ac6d83e
They still used old 1.18-style diffs, with styles copied from core.
Also:
* Remove the distinction between "simple" and "multiline" diff chunk,
enabling consistent styling
* Always show word-level diff, even in previously "simple" chunks
* Ensure the full context is always shown. This was clearly intended
(showing straight side-by-side comparison if there were no changes
and in "simple" chunks, diff otherwise; showing chunks with no
changes), but the default context is only 2 lines.
* Remove the distinction between 'wikitext' and 'text' diffs (all are
treated like 'text' was); it's impossible to show parsed code with
word-level diff, and it was only enabled for "simple" chunks, all of
which are intended to be one-line strings and are shown unparsed
elsewhere (e.g. filter description on the list on Special:AbuseFilter)
Bug: 36478
Change-Id: Ie24ad5ac5a9a2bc9b8f0fc0c4a03d5dfe7a6a83f
Not sure why it wasn't used, maybe because it does a little more
than the bare minimum we need here.
Change-Id: I5e604474849d1389fc4cc260c76cf80e4e466bf5