Reduce code duplication correctly this time, again
authorAryeh Gregor <simetrical@users.mediawiki.org>
Thu, 8 Jan 2009 23:59:25 +0000 (23:59 +0000)
committerAryeh Gregor <simetrical@users.mediawiki.org>
Thu, 8 Jan 2009 23:59:25 +0000 (23:59 +0000)
commitf7486d86420c3b7b189754ce220bb126f01f20a8
tree8de0ca5cf0ce80b31510e318dbb83ac3a33e318b
parenta445dd5e112124eb56a840caab1ed14dac5f89d5
Reduce code duplication correctly this time, again

The test cases I thought up are at:

http://www.mediawiki.org/wiki/User:Simetrical/Id_tests

All of them pass with the patch, except for some that fail on current
code as well: the ones involving templates, multiply-occurring section
headers, or numeric id's (there seems to be a weird bug with those that
probably involves string and numeric id's being used in the same array).
This is true whether $wgEnforceHtmlIds is on or off.  (Actually, the
problem with numeric keys doesn't happen with $wgEnforceHtmlIds off,
because of course numeric ids aren't allowed then.)
includes/parser/Parser.php