Commit graph

47 commits

Author SHA1 Message Date
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
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
glaisher 6129d2f500 Add a link to filter id in Special:AbuseFilter/history
Currently, there is no link to the current version of the filter
from the history (unless one clicks on the last timestamp link of
that filter) and that is sub-optimal.

Change-Id: Ibc7fcfab386e687d052878602fa810c5a3590d6c
2014-11-17 22:50:43 +05:00
Chad Horohoe f38a00336d Don't even mention $wgTitle in comments
Change-Id: I28c8c4cb31e7beafcc3bca2620c3e65d8853ad51
2014-01-22 20:47:06 -08:00
Siebrand Mazeland a178585558 Remove duplicate case expression
Code was unreachable.

Change-Id: I83b1c2e288cb3fab50155f7baf7f608bed6274da
2013-08-05 12:46:53 +02: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
jenkins-bot 4dca6c6e14 Merge "Fix the subtitle for the AbuseFilter history view" 2013-05-23 14:02:15 +00:00
Marius Hoch 6ac46771c6 Fix the subtitle for the AbuseFilter history view
The html was wrongly escaped. Also append it to the
existing one to leave the navigation in place.

See the subtitle on:
https://en.wikipedia.org/wiki/Special:AbuseFilter/history/?user=Foo

Change-Id: I5725fe15eda1a48fd313c6394800e8b92c450d9d
2013-05-23 13:04:09 +00: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 3a3c738f50 Escape AbuseFilter description properly (disallow wikitext)
Right now the public description of AbuseFilters can contain
wikitext which will be parsed.

With this change the public description will be escaped
everywhere to prevent the parsing of eg. templates on
Special:AbuseFilter/history.

Change-Id: I777cac5fc195819ed296f791d0b8cc3ed2ae9eea
2013-02-05 00:08:20 +01:00
Marius Hoch c4e78e9713 (bug 18174) Added Older and Newer change link to Abusefilter diff
On top of that I changed /history to no longer show the
changes link if it's the first revision of the filter.

As I was on it I fixed the diff selection for diffs like
history/1/diff/2/next where change number 2 was compared
to the last change of the filter instead of the next one.
This probably went unnoticed because the /next action isn't
linked anywhere within the software itself.

Change-Id: Ic28bb696a4dbbb75e0bfcae1843ccefab1a9508a
2013-01-18 10:42:22 +01:00
Marius Hoch 636018137b Resolved two array_map wfMsg FIXMEs
Resolved two wfMsg related FIXMEs introduced in
I02ba4ce31b6aca5b7324114093f8ece143abc295 using
foreach loops. (UNTESTED)

Change-Id: I84e9b875b670f9eaa9c8a70e85c3b1b637113033
2012-10-10 19:59:14 +02: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
Andrew Garrett dc207d0cbd Abuse Filter: Allow filters to be split into "groups" for the purposes of operating them on different types of input.
The purpose of this change is to allow AFTv5 developers to run a separate list of filters against article feedback actions without issues of cross-contamination and bumping up against the condition limit.

Change-Id: I758795f01eaf3ff56c5720d660cd989ef95764a7
2012-05-12 12:53:32 +10:00
Sam Reed 69e582dc17 More documentation stubs
Fix Html::inputLabel to Xml::inputLabel

Fix up some deprecated code

Change-Id: If6503b1794d89666206802591094949e5d715ac1
2012-03-26 16:03:23 +02:00
Roan Kattouw 6c4bd57043 Revert r111217 (unreviewed rev in AbuseFilter) and its dependencies r113585, r113587, r113588, r113589.
All of these revisions are tagged with 'gerritmigration' and will be resubmitted into Gerrit after the Gerrit switchover. See also http://lists.wikimedia.org/pipermail/wikitech-l/2012-March/059124.html
2012-03-21 19:41:11 +00:00
Sam Reed 05a9d4d061 More documentation stubs
Fix Html::inputLabel to Xml::inputLabel

Fix up some deprecated code
2012-03-11 20:51:54 +00:00
John Du Hart 7cf809bb0e Changes from r103817 2011-11-22 16:08:18 +00:00
John Du Hart 274dcd06a2 Pass one of converting AbuseFilter to use ContextSource
The main AbuseFilter class still needs to be fixed up, but that's a bigger job and I'm out of time
2011-11-16 05:34:24 +00:00
Raimond Spekking 4e578cac93 Run some filter IDs through formatNum() for better l10n 2011-10-17 07:56:05 +00:00
Sam Reed a9e738f099 More document
Few minor code improvements
2011-08-24 22:11:52 +00:00
Sam Reed 6098610527 Another big cull on unused variables and such 2010-10-29 21:55:29 +00:00
Sam Reed cf800e4c18 Start removing/fixing calls to deprecated methods in WMF used extensions 2010-10-29 15:14:44 +00:00
Jack Phoenix 5e0330c6cc AbuseFilter: coding style tweaks, changed some while loops to foreach (as per http://www.mediawiki.org/wiki/Manual:Coding_conventions#Assignment_expressions) and added __METHOD__ to one DB query 2010-08-19 21:12:09 +00:00
Sam Reed 6981886b50 Nuke some more unused globals 2010-07-24 21:12:27 +00:00
Siebrand Mazeland b274606879 Update code formatting, run stylize.php, whitespace updates 2010-02-13 14:10:36 +00:00
Jack Phoenix e2a16fe755 AbuseFilter: big commit - coding style & spacing cleanup; also marked SpecialPages' construct() and execute() functions as public and capitalized some SQL keywords 2009-10-07 13:57:06 +00:00
Andrew Garrett d69a31acb3 Fix weird bug where unchanged conditions were being parsed as wikitext in diff displays, and usage of deprecated method 2009-07-17 14:03:11 +00:00
Andrew Garrett 14b850f891 Implementation of global filters, including a major i18n change for abusefilter-log-detailedentry message (rename and split). Needs further testing before deployment 2009-03-30 06:12:12 +00:00
Andrew Garrett 0ce853e093 Prevent leaking of hidden filters through history interface. 2009-03-17 13:18:33 +00:00
Andrew Garrett 5493b2a690 Add diffs to AbuseFilter. Includes a related pare-down of history, under the assumption that diffs will take up the slack 2009-03-12 05:04:39 +00:00
Raimond Spekking 06a1e8303d Follow up r47847: Show the timestemp in users preference timezone 2009-03-11 18:58:38 +00:00
Andrew Garrett 3a55ecbc85 Link together abusefilter pages with a navigation interface at the top. Add a better intro to the abusefilter home page. 2009-03-11 05:55:06 +00:00
Raimond Spekking 58fdf4f05d * Add Language::semicolonList() function
** Todo: combine all three list functions (comma, semicolon, pipe) into one function with a parameter?
* Use pipe as backlink separator to be consistent with other navigation elements
* Show the colon for case 'afh_actions' only if parameters exist
** Remove the now useless message
* Localize the usages of comma and semicolon
2009-03-06 10:56:37 +00:00
Andrew Garrett feae69f031 Silly syntax error 2009-02-18 23:32:56 +00:00
Andrew Garrett 08d6218ee1 Always include afh_pattern in the fields to select. 2009-02-18 21:43:32 +00:00
Raimond Spekking 22f57ec7d7 * Replace hardcoded '...' as indication of a truncation with the 'ellipsis' message
Per Brion's suggestion in http://lists.wikimedia.org/pipermail/wikitech-l/2008-December/040796.html
2009-02-13 19:13:48 +00:00
Tim Starling c8b0007232 * Break long lines. If I'm going to review this code, I need to be able to read it.
* Write array literals with one item per line. This makes diffs which add or remove items far easier to interpret, and makes merging such changes feasible. And it looks nicer too.
* Use line breaks to show the logical structure of your code. This enhances readability. Bring similar elements in a list into alignment, in order to reveal the differences between those elements at a glance.
* Removed a fun game of spot-the-difference in AbuseFilterHistoryPager::getQueryInfo(). If I want fun games I'll play UFO:AI.
* Moved some oddly placed assignments (in expressions) to their own statements: such assignments reduce readbility.
2009-02-07 09:34:11 +00:00
Andrew Garrett 7dd35167ee Show filter itself, rather than the private comments, in the recent filter changes display. 2009-02-04 19:56:21 +00:00
Andrew Garrett 3e67f66246 Add a missing field in SELECT. 2009-02-03 18:07:11 +00:00
Andrew Garrett 36b78662b0 Refactor, pretty up and spread localisation of filter consequences (in logs, history, filter summary, etc) 2009-01-28 01:26:38 +00:00
Andrew Garrett a72320d1a8 Use <div>s instead of <strong>s to highlight changed columns in history. 2009-01-27 07:11:04 +00:00
Andrew Garrett 2f8fcdc86a Fix history item links. 2009-01-27 07:05:23 +00:00
Andrew Garrett 83d4b5a91f Bold and apply a subtle background colour to the changed fields in Abuse Filter history -- will make things much easier to track. 2009-01-26 22:31:02 +00:00
Andrew Garrett 995c28b921 Fix up Abuse Log, by adding descriptions for variables, styling the variable table.
Also, fix up a message naming conflict introduced by r46272.
2009-01-26 19:23:27 +00:00
Andrew Garrett 9ee1f5e267 Add a handy 'Abuse Filter log' where you can see all recent changes to filters, and narrow it down by user if you like. 2009-01-26 18:50:20 +00:00
Andrew Garrett 53179c675f Apply changes from change-tagging branch. I will remove all of the stuff actually related to change tagging in a moment, to avoid trunk changes on Wikimedia sites. 2009-01-23 19:23:19 +00:00