Commit graph

100 commits

Author SHA1 Message Date
Sam Reed 079968308b Documentation, stylize, remove some global dependencies 2012-02-09 01:23:31 +00:00
John Du Hart 4383d6d598 Followup r98500, fixes flash of unstyled content 2012-02-08 14:07:10 +00:00
Sam Reed 954bac92b0 Documentation
Wrapping up some long lines
2012-01-14 15:27:30 +00:00
Brian Wolff af663ef1b2 (follow-up r103260) fix if condition per Umherirrender, change variable name to something less confusing per Nikerabbit. 2011-11-16 12:35:40 +00:00
Brian Wolff 9bd0bc3daa (follow-up r100023; bug 32438) $pagesCount is total number of members a category has, not the number that are "normal" pages. 2011-11-15 23:35:52 +00:00
Amir E. Aharoni 230fffed11 Bug 29357: CategoryTree should have built-in localizable support for pretty Categorytree-member-num.
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.
2011-10-17 11:35:57 +00:00
John Du Hart d7f17e8a37 Followup r98563, don't need those messages anymore 2011-09-30 21:10:08 +00:00
John Du Hart 8e3523c626 Followup r98500, conversion of the Javascript to use jQuery fully. It also makes the Javascript work outside of debug=1 (oops)
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.
2011-09-30 21:08:28 +00:00
John Du Hart e77ae5449b Basic ResourceLoader conversion, jQuery conversion and API use will come soon 2011-09-30 02:51:53 +00:00
Brion Vibber c1f82b9325 * (bug 30834) Fix for incorrect cache handling of output language in CategoryTree ajax requests
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.
2011-09-09 21:08:50 +00:00
Robin Pepermans 47dcfb861f (bug 28349) CategoryTree: Number of pages in a category is displayed incorrectly after an LTR char in an RTL wiki -> add a direction mark 2011-06-24 19:53:15 +00:00
Sam Reed 7dd2a80469 Swap else if for elseif
Trimming trailing whitespace also
2011-06-17 16:25:46 +00:00
Brion Vibber 111b83a16b * (bug 26856) Fix category tree AJAX expansion and inline use for category names that match namespace names ending in colon
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.)
2011-02-13 22:19:18 +00:00
Sam Reed e1e45855eb Method documentation. Remove freeResult call 2011-02-11 11:28:58 +00:00
Roan Kattouw 05e349be6e Clean up query generation in CategoryTree a little bit 2011-01-20 19:37:22 +00:00
Roan Kattouw 9f50a3069a CategoryTree: Force cl_sortkey index. This is a backport of the live hack committed in r67176 2011-01-20 18:55:06 +00:00
Sam Reed a39def326d Conditionals in loops to foreachs 2010-10-29 21:30:20 +00:00
Platonides 57d025e067 Replace getPageRenderingHash with $wgContLang->getExtraHashOptions() + $wgRenderHashAppend
as discussed in bug 20040
2010-10-17 17:24:09 +00:00
Platonides 19904b5851 Use wfMemcKey instead of manually building the memcache key.
Not only is this more elegant, the former had collisions on wikis with different prefixes.
2010-10-10 14:11:25 +00:00
Aryeh Gregor 064ce8137b Adapt CategoryTree to the new schema
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.
2010-08-16 21:57:49 +00:00
Aryeh Gregor e2300181e5 Save up to 200 queries per click in CategoryTree
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.
2010-08-16 21:37:26 +00:00
Aryeh Gregor 6873b490ef Use DB abstraction CategoryTree::renderChildren()
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.
2010-08-13 22:38:00 +00:00
Sam Reed 7beb050639 More wrong static method calls fixed 2010-07-26 13:30:31 +00:00
Sam Reed 78d6b8163d Remove some more unused globals
Kill a couple of other unused variables
2010-07-25 17:12:50 +00:00
Siebrand Mazeland ebff4d349b Replace Title::makeTitle[Safe]( NS_SPECIAL, 'x' ) with SpecialPage::getTitleFor ( 'x' )
And a few other minor changes.
2010-06-08 19:30:48 +00:00
Alexandre Emsenhuber 261d68c15a Big changes to extensions' documentation:
* changed all @addtogroup to @ingroup
* added some @file where needed
* changed some @package/@subpackage to @ingroup
2010-06-06 15:12:22 +00:00
Daniel Kinzler b719db957d PHP compatibility: 5.3.1 is picky about pass-by-reference. Restrict use of &$foo to actual output parameters. This should probably be done for the entire code base. 2010-06-02 09:10:09 +00:00
Roan Kattouw 833afe31a3 CategoryTree: Backport r67183 from 1.16wmf4 2010-06-01 14:28:08 +00:00
Tim Starling adca6de0aa * Per Aryeh's suggestion on CR r66987, treat categories larger than a certain size as empty. The visual presentation is not perfect, but it needs some more aggressive treatment than what I can give it right now.
* Get counts into local variables, to make the code slightly more compact.
2010-06-01 08:58:04 +00:00
Tim Starling 3c3fdfde1a * (bug 23682) Don't allow people to expand subtree when it's known to be empty, this is inefficient.
* 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.
2010-05-28 02:15:44 +00:00
Siebrand Mazeland bc388d6493 * stylize.php, trailing whitespace removed, indentation updated
* removed CategoryTree::init(). Loading messages explicitly is no longer needed
* removed commented out code bits.
2010-04-20 22:00:34 +00:00
Daniel Kinzler 8ca7b829d1 fix bug 20040: add PageRenderingHash to cache key to prevent cache mixup. Patch by Derk-Jan Hartman 2010-04-06 21:46:46 +00:00
Chad Horohoe 2db8ddf48b Get rid of the last (I think) php4-style calls to wfGetDB() 2010-02-13 23:03:40 +00:00
Jure Kajzer da16f18419 replaced hardcoded LIMIT with limitResult function call 2010-02-09 16:15:47 +00:00
Sam Reed 5d1c27e51a Mass convert NULL -> null. Left strings and comments alone, obviously.
As per ^demon's suggestion
2010-01-06 21:24:10 +00:00
Tim Starling 8daf5ed778 One more convert call, not sure where it came from. 2009-05-27 07:45:31 +00:00
Tim Starling 28959f9548 Fixed r51002 by also reverting r49856. 2009-05-27 06:17:56 +00:00
Tim Starling d0c62f44ce Reverted r49855, r49656, r49401, r49399, r49397. The language converter cannot be used outside the parser at present without generating a large number of bugs, due to global lifetime state variables, inappropriate $wgParser references, etc. Some refactoring needs to be done before it can be used in this way. 2009-05-26 07:46:29 +00:00
Philip Tzou 16c2b860ef Use $wgContLang->convertHtml() instead of htmlspecialchars(). 2009-04-25 05:19:46 +00:00
Philip Tzou 94cbc8721a Enabled LanguageConverter on extension:CategoryTree.
Convert title text displayed in Category with title mode.
2009-04-25 05:13:18 +00:00
Alexandre Emsenhuber 9700e2d54a * (bug 16744) Calling <categorytree> or {{#categorytree:...}} on non-existent category no longer expose strip markers
Changed call from wfMsgExt() with 'parseinline' as option to Parser::recursiveTagParse()
2009-04-14 17:44:55 +00:00
Andrew Garrett 3218558463 display: none; the CategoryTree expand links in the HTML, and have JS unhide them. 2009-03-06 23:13:49 +00:00
Siebrand Mazeland 9196456dfe Replace hard coded pipe separators with locale based 2009-02-09 21:59:06 +00:00
Daniel Kinzler 2e7c44ff98 don't use <a> for clickable bullets; improve usability (tab navigation) in text browsers 2008-11-14 12:47:54 +00:00
Daniel Kinzler 96bc20d349 fix typo: use 'parseinline' with wfMsgExt, not 'parserinline' 2008-11-14 12:34:38 +00:00
Brion Vibber 4648a812c9 Cleanup r42210 "* (bug 16015) Change parsing of MediaWiki:Categorytree-member-num to allow &nbsp;"
'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.
2008-10-20 00:57:55 +00:00
Raimond Spekking 7ac2cc94ad * (bug 16015) Change parsing of MediaWiki:Categorytree-member-num to allow &nbsp; 2008-10-18 21:28:23 +00:00
Huji 63d32a5d09 Counts should be shown using localized digits, just like r 37784 2008-07-25 21:55:13 +00:00
Daniel Kinzler 63e2567287 adding option for expandable category-bar. not fully functional until skin refactoring is merged in. Just dont use $wgCategoryTreeHijackPageCategories until then. 2008-07-11 23:18:41 +00:00
Daniel Kinzler 1490e3246d make member count display customizable via system messages 2008-07-11 23:07:01 +00:00