Commit graph

75 commits

Author SHA1 Message Date
jenkins-bot bbd7cdbc95 Merge "Don't show red diff link" 2016-12-21 10:07:54 +00:00
Matěj Suchánek 0b1b87f85a Don't show red diff link
If the log entry refers to a non-existing page, the link is red. In
this case, the diff link only duplicates the main link.

Bug: T47948
Change-Id: I3f0e6e7dfbaa8cccbac8450162df97f4a58cccdc
2016-12-18 21:26:49 +00:00
Huji Lee 928b61e8c3 AbuseLog should show a warning when log ID does not exist
Bug: T152973
Change-Id: I2ccd1744a6b3e9a2ed89ef04c859cbe4f0a803df
2016-12-12 11:48:20 -05:00
Subin Siby f4ddf5dd23 Replaced Linker::link() & Linker::linkKnown() with LinkRenderer
All usages of Linker::link() and Linker::linkKnown() has been replaced with LinkRenderer

Bug: T149346
Change-Id: Id087fe2aeaae81445e83e020ef66b541d9da4060
2016-12-06 23:21:31 -08:00
Kunal Mehta 9eb50de025 Avoid wfMessage() in AbuseFilter::buildVarDumpTable()
Change-Id: I3377623e6ba7f4c203de69d25f677162d6e61e65
2016-09-17 00:27:38 -07:00
Paladox b3081e1798 Update mediawiki/mediawiki-codesniffer to 0.5.1
Change-Id: I4b2055a76db4362a8136e3fd595228cf07d083a9
2016-08-23 16:18:27 +02:00
Glaisher 9e75545804 Make Special:AbuseLog pager more efficient
* Use LinkBatch for local page existence queries needed by Linker
* Cache user links as Linker results in duplicate User::getEditCount query for each row
* Store result of SpecialAbuseLog::isHidden() for each row to minimize calls to
   Revision::fetchFromConds
* Use Linker::linkKnown instead of link when linking to special pages

Example improvements seen locally:
 Before: 1152 queries
 After: 243 queries

Change-Id: I22ba68710f3ecea5b48b25d631da84c6445fcb97
2016-08-15 15:22:18 +05:00
matejsuchanek f5e6c733dc Special:AbuseLog: Substitute username parameter in log message before parsing
The GENDER was not working because it was provided via Message::rawParams().

Change-Id: Ia52958b5529b0c16b6f658bb6d4afd4bb525e972
2016-08-15 08:59:47 +00:00
jenkins-bot 0bfa856cc2 Merge "Support GENDER in two more log messages" 2016-06-25 15:31:38 +00:00
jenkins-bot 8517f8fb47 Merge "Use msg() from Context instead of wfMessage() where possible" 2016-06-12 02:06:47 +00:00
matejsuchanek 5357665db6 Support GENDER in two more log messages
Change-Id: I92085a291565bd76e3f983da3bb4dfdb253b8007
2016-06-04 14:41:37 +02:00
Aaron Schulz 27522a9789 Set doesWrites() for SpecialAbuseLog
Change-Id: I87e1c2852ff1969fb844f66802ca330496c3d58d
2016-06-02 00:10:22 +00:00
Glaisher f735ec943b Use msg() from Context instead of wfMessage() where possible
Also fix doc.

Change-Id: Ie2ea588280df43bc523021a69e118a6dbb90c223
2016-06-01 17:44:33 +05:00
tonythomas01 b04da51af9 Convert Special:AbuseLog to HTMLForm from XML Form
Changes after this conversion:
* order of the fields changed slightly from the original ( User,
Filter, Title ) to ( User, Title, Filter )
* $this->mSearchUser is set as the Default value of 'user'
field, making the value from the request show up there even if
its value was invalid. Earlier, it should show up 'null' due to
loadParameters() validation checks.

Bug: T132287
Change-Id: I614cd9b962b7b672e43dd35b14700c72f3425c1f
2016-04-20 00:12:31 +05:30
Florian 98cb0973cd Remove usage of DifferenceEngine::generateDiffBody()
Bug: T122754
Change-Id: Ic13c22169317150ee9fe00a0334eed7e3623c5cf
2016-04-02 13:10:23 +00:00
Siebrand Mazeland ce1396aea7 Add support for PHP CodeSniffer checks
Also fix any remaining errors and warnings.

Change-Id: Ie49c6172e6bbf8040e5524d33d2f719e96784745
2016-01-06 09:59:47 -08:00
Niklas Laxström 0f9529e894 Remove unnecessary getPageTitle methods from special pages
This extension already requires 1.23+

Change-Id: Ia3c50360a56586d349f6181077b680b630507441
2015-11-23 11:17:42 +01:00
umherirrender d829d0c0b3 Replace deprecated $wgSpecialPageGroups
$wgSpecialPageGroups is deprecated since 1.21
override SpecialPage::getGroupName instead

Change-Id: I2d1a3182a554825b24145bacef0f4c7520b92dd5
2015-05-15 21:42:44 +02:00
se4598 1995541e3f Allow searching for local hits on central wiki
You can now specifiy on a central wiki on the AbuseFilterLog in the
wiki-field the local wfWikiID() to search for filter hits on this wiki.
background: for local hits afl_wiki doesn't contain the wiki name but is
NULL.

Bug: T85323
Change-Id: Ic93a530ee4d2d083b38b0caed7ce02dacdecca6c
2015-01-04 07:59:07 +00:00
se4598 b6ff5663ab add missing title-param to abusefilter-log form
without it, you get redirected to the main page (index.php) when
$wgUsePathInfo = false; as no title-parameter is given.

also don't rely on __tostring.

Change-Id: I6b97d61c58b196c95836036219201cff8e2e0657
2015-01-04 07:49:44 +00:00
helderwiki 3b284d8ef2 Expose variables to JavaScript when viewing details or examining a log
When examining AbuseFilter logs using user scripts, it is convenient to have
access to the variables shown in the table, without having to interact with
the page to get the content of the table cells.

This change introduces the variable wgAbuseFilterVariables on these pages:
* Special:AbuseFilter/examine
* Special:AbuseLog/<logId>

Change-Id: I2cebf141e6c1d26e62ed7e6ba0b5c327694e2ef8
2014-08-07 10:23:54 +00:00
Jackmcbarn 3ec370357e Support searching for multiple filter IDs
Allow a pipe-separated list of filter IDs to be entered on
Special:AbuseLog, returning all entries that were generated by any of the
given filters.

Change-Id: I170dc46ef51135fe711d0a76113d367033b67cc9
2014-03-22 02:21:38 +00:00
jenkins-bot a23ca862e4 Merge "always show diff link if available" 2014-01-09 13:40:20 +00:00
nullzero ecaa6dcb0d always show diff link if available
This patch makes a diff link appear in Special:Abuselog no matter a filter
is public or private. Because there is much information to figure out which
revision a filter catches, showing a diff link will make patrollers more
convenient without leaking more information.

Bug: 59695
Change-Id: I6a4432cbb41ae78583cc87355514f252984c1005
2014-01-09 04:57:44 +07:00
Jackmcbarn 2bea87c1d0 Restore the Details link in Special:AbuseLog
The fix for bug #50808 resulted in the Details link being hidden from the
log page as well as the details page. This restores it to the log page.

Change-Id: I651f0f41e0d603cbd28cbf920842d6bdd879f4b1
2014-01-07 21:09:30 +00:00
tonythomas01 d96f951afa Removed the "details" link if the user is already in details page
Removed the detailsLink creating code and assignment.
Cleaned Whitespace

Patch courtesy: Sakshi Bansal

Bug: 50808
Change-Id: I06a473550db79752aacb874f17f879f3b1ee1991
2014-01-03 23:40:17 +05:30
Kunal Mehta f7ed4cffee Restore b/c for pre-1.23 MediaWiki versions
Change-Id: Ibcc48b519271645f85f186ecb20fc6d2854aee06
Follows-Up: I67701856297927b94aa443a78376bae7d7860def
2013-12-27 01:32:24 -08:00
Kunal Mehta e7f8acf709 Replace usage of SpecialPage::getTitle with getPageTitle
Was deprecated in 1.23, see Icdcf5d5295ef5e7f08b1d403e0c123f78738fd40

Change-Id: I67701856297927b94aa443a78376bae7d7860def
2013-12-26 22:36:34 -08:00
Siebrand Mazeland b384fe8d8f Declare class properties, update docs
Based on static code analysis.

Change-Id: Ibafe33b6327ab72429ba961079af40039fb41cbf
2013-11-06 16:12:37 +00:00
jenkins-bot 666db2e7ef Merge "Make global AbuseFilters searchable on Special:AbuseLog" 2013-07-10 17:17:13 +00:00
Marius Hoch 433da007e0 Make the links in Special:AbuseLog plainlinks
Those shouldn't have the external link icon set

Change-Id: I308c3b0d4ce2e19a1046bf2c16e9168bfcd5c66c
2013-07-10 14:55:00 +00:00
Marius Hoch d2a342788f Make global AbuseFilters searchable on Special:AbuseLog
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
2013-07-10 14:54:51 +00:00
Marius Hoch 6caff9d822 Link correct Page in AbuseLog for users who can't see details
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
2013-07-09 18:04:53 +02:00
MatmaRex 6756f6f936 Pass context when contructing DifferenceEngines
Change-Id: I926c910bf983ae023bfc0c20a9262a1bde452a17
2013-06-29 23:52:08 +00:00
Marius Hoch 8957c003ba Revert "Change AbuseFilter to use UserCache instead of user_text fields"
This reverts commit aaa256aa94.

Bug: 49918
Change-Id: I597cbc03e2ecc45cfcca632232d5bbb1ef7be9d8
2013-06-27 01:01:15 +02:00
MatmaRex ddb57635be SpecialAbuseLog: use DifferenceEngine::addHeader to render diffs
Not sure why it wasn't used, maybe because it does a little more
than the bare minimum we need here.

Change-Id: I5e604474849d1389fc4cc260c76cf80e4e466bf5
2013-06-25 17:25:14 +00:00
nischayn22 ca1bb852fb Added css class for hidden logs.
Bug 28247

Change-Id: Icd58fce8f11308ba44abd403c150ebf27a25e0ca
2013-04-22 01:27:17 +05:30
Aaron Schulz 05b38eb613 Merge "Change AbuseFilter to use UserCache instead of user_text fields" 2013-04-09 22:00:51 +00:00
Marius Hoch f835cba0c2 Restore compatibility with MW 1.20 and 1.19
Partly reverts I8e420f0259ef6c9e579f7a00beb58f28af9da37d (untested)

Change-Id: Ib8634a3178a626f50f1150661842c16dc26c9516
2013-04-01 19:54:39 +02:00
Siebrand Mazeland e87bb7a59c Replace 2 deprecated methods
Change-Id: I8e420f0259ef6c9e579f7a00beb58f28af9da37d
2013-04-01 11:05:08 +02:00
Alex Monk aaa256aa94 Change AbuseFilter to use UserCache instead of user_text fields
Change-Id: I51210ff91366a3a1610d34ca20e8966aaded89a0
2013-03-27 15:59:34 +00:00
Marius Hoch 233a850a08 Make AbuseLog searchable by IPv6 IPs
Bug: 39449

Change-Id: Ie331ec7ef3b461ae10f0e28fe50cb86684c6d3a0
2013-03-26 00:30:32 +01:00
Kunal Mehta d87d77db3f (bug 34946) Make afl_user_text availible as $9 for log entries
This would allow for external lookup tools to be linked in the log entry itself

Change-Id: Ia484ad2aedf22a6a22172e6f752165cc0cab4009
2012-12-16 04:21:13 -06:00
Kunal Mehta 71a3679553 (bug 42820) Abusefilter log makes "contribs" link blue even if user has 0 edits
Change-Id: I9f3c35f35a8923e6713caee5b60773ff2de73560
2012-12-14 08:21:14 -06:00
Catrope 4b6c3b8a16 Merge "Nicer Special:AbuseLog URIs when using the form there" 2012-10-25 03:18:34 +00:00
Siebrand Mazeland 176227e721 Maintenance for AbuseFilter extension.
* Replace deprecated methods.
* Remove no longer needed function fnmatch().
* Remove superfluous newlines.
* Remove unused and redundant local variables and globals.
* Deglobalization.
* Update documentation.
* Fix incorrect return values or add FIXMEs when in doubt.
* Escape output in a few places where needed.
* Remove unneeded MEDIAWIKI constant checks.
* Fix various JSHint/JSLint issues.

Patch Set 11: Merged https://gerrit.wikimedia.org/r/24701 into
this one per Siebrand's request

Change-Id: I02ba4ce31b6aca5b7324114093f8ece143abc295
2012-10-09 22:26:45 +02:00
Marius Hoch ea7b8ac92c Nicer Special:AbuseLog URIs when using the form there
Make the GET URIs constructed by the form on Special:AbuseLog
nicer. Right now they're like Special:AbuseLog?title=Special%3AAbuseLog
(the title is useless as the form is already constructed with
action=/wiki/Special:AbuseLog).

Change-Id: Ibbc294431443730c5862eeadb806fbc091c5ed6d
2012-10-02 17:24:56 +02:00
csteipp 1973ea6714 Add Global Rules
* Update rules list view to show global rules toggle, global rules
* Update rule processing to get global rules from memcache, if no
rule exists, get them from the central database and store them in
memcache
* Delete global rule key whenever global rules are updated
* Add filtering for log by wiki on the central database, updated
table definitions to add index on afl_wiki
* Add global $wgAbuseFilterDisallowGlobalLocalBlocks so local wikis
can prevent global rules from locally blocking, removing or revoking
permissions.

* patchset 13: Include recommendations from Tim. Add db updates to
LoadExtensionSchemaUpdates hook.
* patchset 14: forgot to add new files

Change-Id: Id69a9d603f9679f838e8691c651a3e9d8461b422
2012-08-27 03:30:07 +00:00
Reedy fad1fe4c41 Call to a member function getVars() on a non-object in SpecialAbuseLog.php on line 284
Seen on wmf fatal log

Change-Id: I50eb4f9d1b19c8c39ede07e1149baf475cccaaaf
2012-07-24 14:50:01 +01:00
Demon 95536ef72c Merge "$sk is undefined. Swap for Linker::" 2012-07-18 18:21:51 +00:00