I'm working on implementing (in 1.5) the feature requested in BUG
#1289 (
http://bugzilla.wikipedia.org/show_bug.cgi?id=1289), which I
believe can be (at least partially) addressed by allowing for
descending category lists.
The thought I had was to implement a new magic word "__SORT_DESC__"
(of course, the actual wording is open to change). If this directive
is included in the category page text, then the category listings
would be in descending order.
I've added a bit of code to Parser.php that detects this magic word
and makes a call to the CategoryPage object to tell it to use a DESC
sort. Seems simple enough.
I've got things working, except that when the cached copy of the
parsed page is used, this call to the CategoryPage object is never
executed, and the category list is not DESC. When the cached copy of
the page is not used (or does not exist), then things happen just
right.
The actual category lists are not cached -- only the introductory
portion that people can edit manually. So when I first visit such a
page, things look great, But if I do a reload (eg, ctrl-F5 on Firefox)
the directive is lost. I run into the same problem on subsequent pages
of a multi-page category list.
Short of turning off the parserCache for all category pages, does any
know how to avoid this problem?
-- Rich Holton
en.wikipedia:User:Rholton