Somewhere along the line this extension's JS was refactored,
except for a part which was left as is, and was calling functions
since renamed, and still assuming top loaded...
Just kill $wgCategoryTreeDynamicTag, since it doesn't work, it
hasn't worked for a while, and it looks like a bit of work to
make it work properly. Also change the cache disabling defaults
of this extension to be 6 hours so it doesn't cause explosions.
If someone wants the feature represented by $wgCategoryTreeDynamicTag
they can of course re-introduce it in a subsequent commit. In the
mean time, let's not have broken code.
Bug: 59798
Change-Id: I01e0bd264e2a007cd9de017d10667bb2809d70a9
Remove some unused variables (set to '' and never set for use in query)
Wrap some long lines
Add a few braces
Add CategoryTreeCategoryViewer to AutoloadClasses
Add @var type docs for member variable
Change-Id: I77c870a9159a4e16a4fe172ac007b28a221cb090
This patch adds namespace selection interface in Special:CategoryTree.
Without this patch, this useful option is allowed only through URL manipulation.
The options are now wrapped within table.
Change-Id: Ib7152320c18edc8a428846945aa0949b43df39f2
* Drop MSIE 5.0 and 5.5 hack in CSS.
* Replace use of deprecated wfMsg* functions.
* Update documentation for two methods.
* Update code formatting (long lines, {}).
Change-Id: I9601e9263b9a188d4a843c3be8ee6808d2e7a117
* Only occurred on category trees produced by <categorytree>. The category trees dynamically created when expanding the [+] toggle in the subcategory list on a category page were not affected (since those don't have data-ct-options attributes and thus JS uses the default via mw.config.get( 'wgCategoryTreePageCategoryOptions' ), which wasn't double escaped)
* escapeTagsOnly escapes & to "
* Xml::openElement does normal attribute escaping, assuming unescaped input
Before:
<div class=" CategoryTreeTag" data-ct-mode="0" data-ct-options="{&quot;mode&quot;:0,&quot;hideprefix&quot;:20,&quot;showcount&quot;:false,&quot;namespaces&quot;:false}">
<div class="CategoryTreeTag" data-ct-mode="0" data-ct-options="{"mode":0,"hideprefix":20,"showcount":false,"namespaces":false}">
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.