Added the messages:
* categorytree-num-categories
* categorytree-num-pages
* categorytree-num-files
* categorytree-num-empty
Added documentation for all of them and for categorytree-member-num and also localized them for Hebrew.
Rewrote the part that uses categorytree-member-num to automatically create a comma-separated list of relevant member counts. categorytree-member-num will still be used the same way if it is customized on wiki.
There's a couple of WTF moments in the code, this is really due to some issues with the PHP side of stuff. It really needs some TLC but for right now it works, I'll come back to it before 1.19 and clean it up.
Memcache key was not taking UI output language into account, and thus could serve you a cached record in another language from what should have been rendered for you.
Added UI language into the cache key, so they no longer interfere with each other.
The previous check that checked for the alt-namespace case caught things for 'Category:Wikipedia:Foo' but not for 'Category:Wikipedia:', where the 'Wikipedia:' alone doesn't return a legit title.
(Conceivably, Title::newFromText() should actually handle this case when an alt ns is given, should be examined later.)
This should obsolete $wgCategoryTreeMaxScanRows, added in r67179, so I
removed it. Note that I only tested with very basic usage, since I
don't quite understand all the complicated things this extension can do,
and some code paths are certainly going to remain inefficient, since
arbitrary namespace filtering seems possible here (at least
renderChildren() has support for it). However, clicking the little plus
sign on category pages should now scan only as many rows as are actually
used, so no limit should be necessary.
Sorting is now by cl_type, cl_sortkey instead of cl_sortkey. This
change has to be made to all users for efficiency, since the old index
was dropped. It means the sort order might be somewhat unexpected in
some cases, but for basic CategoryTree use it makes no difference, since
all the results have cl_type = 'subcat' anyway.
Fixes bug 23682, I think.
Remember, people: if you use Titles that don't have all the proper
fields prefetched, LinkCache will fetch them for you, one by one.
Fetching page_id, page_len, page_is_latest, and page_latest will make
everything work without needless queries.
Formerly pieced it all together with strings. This seems not to have
broken anything for basic usage, but I didn't test thoroughly. Also
fixed some random style errors and unused variables while I was there.
* Fixed a bug causing the "+" link to be shown even when the number of subcategories is zero, due to the DBMS returning a string instead of an integer, causing triple-equals comparison to fail.
'parsemag' was mysteriously chaned to 'parseinline', which is incorrect given that the result is HTML-escaped with 'escapenoenities' -- they don't play nicely together. :)
Changed it back to 'parsemag'. 'parseinline' *without* 'escapenoentities' might also seem like a good choice, but didn't seem to be what was intended.
Also broke the very very very long line for legibility.