Author: zigger
Description:
If an article contains multiple templates with the same category, that category
is currently displayed multiple times.
Version: 1.3.x
Severity: enhancement
URL: http://en.wikipedia.org/wiki/Wikipedia:Disambiguation
• bzimport | |
Nov 23 2004, 3:54 PM |
F1382: parser.diff | |
Nov 21 2014, 7:04 PM |
Author: zigger
Description:
If an article contains multiple templates with the same category, that category
is currently displayed multiple times.
Version: 1.3.x
Severity: enhancement
URL: http://en.wikipedia.org/wiki/Wikipedia:Disambiguation
dkesh wrote:
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.
Attached:
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
code changes.
river wrote:
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
multiple times.
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.