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
Aryeh Gregor
ed5b83e6ac
Remove most named character references from output
...
Recommit of r66254 to trunk. This was just
find extensions phase3 -iname '*.php' \! -iname '*.i18n.php' \! -iname 'Messages*.php' \! -iname '*_Messages.php' -exec sed -i 's/ /\ /g;s/—/―/g;s/•/•/g;s/á/á/g;s/´/´/g;s/à/à/g;s/α/α/g;s/ä/ä/g;s/ç/ç/g;s/©/©/g;s/↓/↓/g;s/°/°/g;s/é/é/g;s/ê/ê/g;s/ë/ë/g;s/è/è/g;s/€/€/g;s/↔//g;s/…/…/g;s/í/í/g;s/ì/ì/g;s/←/←/g;s/“/“/g;s/·/·/g;s/−/−/g;s/–/–/g;s/ó/ó/g;s/ô/ô/g;s/œ/œ/g;s/ò/ò/g;s/õ/õ/g;s/ö/ö/g;s/£/£/g;s/′/′/g;s/″/″/g;s/»/»/g;s/→/→/g;s/”/”/g;s/Σ/Σ/g;s/×/×/g;s/ú/ú/g;s/↑/↑/g;s/ü/ü/g;s/¥/¥/g' {} +
followed by reading over every single line of the resulting diff and
fixing a whole bunch of false positives. The reason for this change is
given in <http://lists.wikimedia.org/pipermail/wikitech-l/2010-April/047617.html >.
I cleared it with Tim and Brion on IRC before committing. It might
cause a few problems, but I tried to be careful; please report any
issues.
I skipped all messages files. I plan to make a follow-up commit that
alters wfMsgExt() with 'escapenoentities' to sanitize all the entities.
That way, the only messages that will be problems will be ones that
output raw HTML, and we want to get rid of those anyway.
This should get rid of all named entities everywhere except messages. I
skipped a few things like   that I noticed in manual inspection,
because they weren't well-formed XML anyway.
Also, to everyone who uses non-breaking spaces when they could use a
normal space, or nothing at all, or CSS padding: I still hate you. Die.
2010-05-30 17:33:59 +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
32aedf1644
(bug 18077) PostgreSQL compatibility issues in AbuseFilter, patch contributed by Brad Jorsch
2009-04-24 03:27:14 +00:00
Andrew Garrett
186fc67373
Crackdown on filter evaluation by users unable to modify filters. This is a DoS vector which I thought I'd already plugged.
2009-03-31 15:13:26 +00:00
Andrew Garrett
32c83009e3
Fix examine interface, was broken for a while
2009-03-25 02:53:23 +00:00
Andrew Garrett
903cd76bd8
Fix output for examine interface in cases where no edits are available
2009-03-22 03:12:53 +00:00
Andrew Garrett
23ba2cb968
Fix abuse filter examine interface for new account creation log.
2009-03-22 02:59:01 +00:00
Alexandre Emsenhuber
80fdcf77ce
Fix calls to deprecated functions
2009-03-21 18:47:26 +00:00
Andrew Garrett
b35585733b
Add paging to examine
2009-03-12 11:38:21 +00:00
Andrew Garrett
f94f42b506
Store Abuse Filter variable dumps to external storage instead of leaving in afl_var_dump. afl_var_dump needs to be left as a BLOB for the moment for backwards-compatibility.
2009-02-27 03:06:19 +00:00
Andrew Garrett
92698e95ba
Improve AbuseFilter performance by implementing lazy initialisation of computed variables.
...
This has been done by replacing simple associative arrays with an AbuseFilterVariableHolder, which recognises helper classes called AFComputedVariables.
Computation may occur during the abuse filter analysis, or later when testing and reviewing filters.
2009-02-26 12:15:14 +00:00
Andrew Garrett
e0cd6a327c
Fatal
2009-02-25 02:40:05 +00:00
Andrew Garrett
057f9f80db
Normalise usernames before searching for them in Abuse Filter examine and test interfaces.
2009-02-25 02:33:09 +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
fcdfd79c67
Allow Abuse Log entries to be examined in the same way recent changes items are.
2009-02-04 19:51:03 +00:00
Andrew Garrett
ae7089e23d
Make (examine) links on batch test page propagate the filter that was used
2009-01-30 23:24:11 +00:00
Andrew Garrett
189d1fde40
Minor fixes for r46557
...
* Don't show revisions in the examiner which can't be examined.
* Fill out some forgotten interface messages.
2009-01-29 23:04:06 +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