Last modified: 2010-05-15 15:28:17 UTC
If an article contains multiple templates with the same category, that category
is currently displayed multiple times.
Created attachment 134 [details]
Changes mCategoryLinks in ParserOutput to hash table
This patch changes the array mCategoryLinks from being numerically-indexed with
category titles as values to being title-indexed with meaningless values,
therefore not reproducing categories multiple times. function merge in
ParserOutput might need to be changed (it accesses mCategoryLinks directly),
but I can't figure out what it does or where it's supposed to be used, so I'm
not touching it. Tested on HEAD. Note that mCategoryLinks in LinkCache
already works correctly, it's only the output that's wrong.
Committed for 1.4. I've also added a version stamp for the
ParserOutput objects, since these are retained in serialized form in
the parser cache and we need to be able to invalidate old data when
the format changes in an incompatible way.
Dan, a nice trick: if you do 'cvs diff -u' it will produce more legible
diffs, which are also easier to reintegrate when the surrounding
*** Bug 53 has been marked as a duplicate of this bug. ***
I don't like this change - if double categories aren't shown on a page when it's
done in error, they won't be fixed. One solution might be to show double
categories if a single 'object' (page, template, ...) includes the category
As it is only one link can make it into the link tables; this change makes the UI
behavior match the data as stored in the database.
This was fixed in 1.4; resolving FIXED.