Improve ugly interface for Sanitizer::escapeId()
authorAryeh Gregor <simetrical@users.mediawiki.org>
Tue, 30 Dec 2008 00:22:14 +0000 (00:22 +0000)
committerAryeh Gregor <simetrical@users.mediawiki.org>
Tue, 30 Dec 2008 00:22:14 +0000 (00:22 +0000)
commit69d11310ffa55819c75e0b04621182669f9cb1f1
tree4867cb4d910c6180d199b3aed56ebe6dfcd1e41d
parent5f237ee1296c00d268d1d36556e65f31d99c9ff4
Improve ugly interface for Sanitizer::escapeId()

Calling it with no extra arguments will now assume that you're escaping
a whole id, not an id fragment, which is safer.  Also, instead of ugly
bitfield-based options, I've changed the options to use an array of
strings.  I fixed all callers in trunk.  Out-of-tree callers that were
using Sanitizer::NONE will get correct behavior, while those that were
calling it with no arguments will get slightly changed behavior (an x
will be prepended).  I think this is harmless enough that we can skip
back-compat cruft here.

This should cause no visible changes.  No parser test regressions.
includes/ImagePage.php
includes/Sanitizer.php
includes/Title.php
includes/parser/Parser.php
skins/Modern.php
skins/MonoBook.php