Commit graph

63 commits

Author SHA1 Message Date
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
Chad Horohoe 5fce797b18 Revert r66934 (Removing wfLoadExtensionMessages() from everything). I disagree on principle...we branch extensions for this very reason. But people want trunk extensions compatible for several versions back, meh. 2010-05-27 15:56:53 +00:00
Chad Horohoe 3283b90f01 Large commit. Removed 800+ references to no-op wfLoadExtensionMessages() 2010-05-26 22:25:32 +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 98e6988d45 Force changedfilter parameter to integer on Special:AbuseFilter.
Resolves bug 20496
2009-09-18 14:30:05 +00:00
Andrew Garrett 48bfcc35ee Various code quality fixes for AbuseFilter suggested by Tim Starling in a private email, including bugfixes, memory safeguards, performance improvements, removal of redundant code, consolidation of similar functionaality. 2009-05-26 13:08:15 +00:00
Andrew Garrett 1a0fc0fea9 Add import/export interface for filters so that filters can be copied across wikis 2009-04-23 04:23:56 +00:00
Andrew Garrett 77905f7873 Fix nav links for edit screen 2009-03-17 14:09:17 +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
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
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 769d0a6ea2 Add a nice convenience link to the testing interface to the filter editing interface. 2009-01-30 19:19:03 +00:00
Andrew Garrett f9c9c07ccf Abuse Filter changes designed for testing filters against real data:
* Add searching and filtering functionality to the existing 'test' interface.
* Add an 'examine' interface designed for testing filters against a previous change, selectable through the search interface in either the 'test' or the 'examine' view.
* Minor enabling change in ChangesList core, to allow subclassing.
2009-01-29 22:44:31 +00:00
Andrew Garrett cb5eca50fd Add Special:AbuseFilter/test, which allows (trusted for now, due to DoS potential) users to enter a filter, and have it checked against the last 100 RecentChanges items while-u-wait.
Some related cleanup to change tagging in ChangesList.
2009-01-28 23:54:41 +00:00
Andrew Garrett 050575a5af Allow users with the appropriate permission to mass-revert all actions (like blocking, deautoconfirming and degrouping) taken by a filter, with an appropriate summary. 2009-01-28 00:10:35 +00:00
Raimond Spekking 53887bb338 * Add $wgAbuseFilterStyleVersion to SpecialAbuseLog::execute
* Remove one dupe call of addExtensionStyle from SpecialAbuseFilter::execute
* Bump $wgAbuseFilterStyleVersion per CSS changes in r46325
* Add a space between drop down and submit button
2009-01-27 17:32:30 +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 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
Andrew Garrett 150ecdb2e9 Fix up AbuseFilter syntax checking:
* Display result below the field, rather than at the top of the page.
* Clear the result when the field is changed, not after some arbitrary time period.
2009-01-15 19:04:36 +00:00
Andrew Garrett 6c7b701cc2 Abuse Filter:
* Change history page to use the TablePager.
* Change main page to link in the filter ID, rather than a dedicated edit link.
* Other misc. cleanup.
2008-12-15 14:50:35 +00:00
Andrew Garrett 83a741ee24 Do initialiseRange into Block::insert.
Fix related fatal in Abuse Filter.
2008-12-15 12:10:41 +00:00
Andrew Garrett 0d9e0384fc Fail gracefully when a bad filter ID is given in the URL. 2008-12-13 12:52:16 +00:00
Andrew Garrett 80922896ff Fix a fatal... 2008-12-13 03:47:30 +00:00
Andrew Garrett 681586df79 Simplify permissions check 2008-12-13 03:42:23 +00:00
Siebrand Mazeland 6831e5d5b6 Consistent casing for addHTML() 2008-11-06 22:20:29 +00:00
Andrew Garrett fe00c5e019 Minor bugs in abuse filter, plus new ALL_LINKS/ADDED_LINKS/REMOVED_LINKS 2008-10-24 08:58:32 +00:00
Andrew Garrett e6d30eb00f Abuse Filter: Fix minor bug in a previous commit (was spewing notices on filter save), and trim filters etc before they get added. 2008-10-22 07:14:16 +00:00
Andrew Garrett a16a14acba Abuse Filter:
* Display list using a sexy TablePager.
* Allow sorting by various things, like hit count, id, consequences, last modified, etc.
2008-10-22 06:18:02 +00:00
Andrew Garrett c957772a0d Abuse Filter:
* Prettify history titles. They're now Special:AbuseFilter/history/<filterid>
* Prettify history *pages*. They now truncate the filters at a few hundred chars, and have links to open the individual history items in the editor, with a big boilerplate at the top and the bottom in case people forget.
* Fix up the log a bit. <li> elements in the 'details' view were invalid XHTML, and very annoying...
2008-10-21 15:14:30 +00:00
Andrew Garrett 0d52f1261a Abuse Filter:
* Consolidate details on the last edit.
* Allow specification of a warning message to display instead of the standard warning (was already implemented in code, but there was no UI for it.
2008-10-21 14:11:03 +00:00
Andrew Garrett 884e0e4dff Abuse Filter:
* Fix up selecting deleted / disabled filters on Special:AbuseFilter. Instead of weird links, it now has a proper form.
* Fix log entries so they can have wikitext, and add a link to the relevant abuse filter for detailed log entries.
2008-10-21 13:43:05 +00:00
Andrew Garrett a610bea913 Use proper nextSequenceValue / insertId system for new filters, instead of adding max(af_id)+1, which doesn't allow concurrent writes. 2008-10-21 12:58:01 +00:00
Andrew Garrett 56065d6a59 Re-commit re-autoconfirmation, with fixes for permissions 2008-09-29 13:30:11 +00:00
Andrew Garrett a374d100ff Revert r41145. Restoring autoconfirmed should really have access control, eh? 2008-09-22 14:07:04 +00:00
Andrew Garrett 74d4fa198f Add a hacky tool for restoring autoconfirmed status when it's blocked by a filter. Don't expect it to get much use, so I haven't put much effort in. It gets the job done, though. 2008-09-22 09:16:45 +00:00
Andrew Garrett 08d3857983 Widdle bug 2008-09-18 13:42:36 +00:00
Andrew Garrett 74097d106e Add rangeblocks, a bit of a nuclear option for the abuse filter. Not intended for Wikimedia use 2008-09-18 13:01:50 +00:00
Andrew Garrett 4fd43cdea9 Add basic functionality to delete filters (not really a deletion, just moved to another list) 2008-09-05 14:27:18 +00:00
Andrew Garrett aac69c2f69 Fix some notices 2008-08-31 07:08:11 +00:00
Andrew Garrett e786ae8f42 Fix misspelling 2008-08-08 11:00:50 +00:00
Andrew Garrett af1cbfb759 Abuse Filter:
* Add power operator.
* Add filter builder (very simple, just a drop-down box with commonly-used constructs)
2008-08-08 09:37:05 +00:00
Andrew Garrett 16909a2c42 Fix two memory leaks in native parser. Now has no memory leaks :-) 2008-08-07 13:53:18 +00:00
Andrew Garrett 016da694a6 Abuse Filter:
* Reimplement tools, starting with a spiffy AJAX expression tester. Didn't bother implementing as non-AJAX, as it's just an extra.
* Change exchange protocol between native parser and PHP app. Resulted in 2-3-fold performance boost.
* Fix minor bug from last night.
2008-08-04 14:27:48 +00:00
Andrew Garrett 4c57a8cf4d Abuse Filter:
* Make with -O3 instead of -g, to improve performance.
* Add AJAX filter syntax checking.
2008-08-04 12:15:14 +00:00
Andrew Garrett 3ba79484db Oops, was using the wrong message 2008-08-04 08:34:40 +00:00
Andrew Garrett 529d7b4277 Abuse Filter:
* Introduce a syntax check on-save.
* Introduce filter history (requires DB schema change).
* Deprecate now non-working /tools interface (will come back).
2008-08-03 14:04:26 +00:00
Niklas Laxström 54b6af040f * i18n fixes 2008-07-29 11:16:35 +00:00