Commit graph

136 commits

Author SHA1 Message Date
Kunal Mehta 1372d9a9e0 build: Updating mediawiki/mediawiki-codesniffer to 0.10.1
Change-Id: I5e312aff6c8eeae2f7540301e21ae07cf01d8c75
2017-07-23 00:08:05 -07:00
Umherirrender 8e4bff8976 Add phpcs and make pass
Change-Id: I52845fc95b53eca5149a947dfc6a1b39100da97b
2017-05-30 20:23:16 +02:00
Umherirrender 3f9ec93abd sizeof -> count
Change php function for more common name

Change-Id: I563d94f05e01ea0a4aca7e80b524101691490469
2017-05-24 20:00:48 +02:00
Fomafix 8989d4428b Fix whitespaces
Change-Id: I592138cb4643ef5031cbe341bbbe5d9e78562d4c
2017-04-18 01:42:24 +00:00
Umherirrender d8023fd6c0 Add category count to Special:TrackingCategories
Add the category count to the core special page
Special:TrackingCategories to see at one view, if such categories
contains pages which maybe needs attention.
Depends on a hook addition in core.

Depends On: If195fb55dee1350a6de095892ce89e6565287cd9
Change-Id: If3815586c2a280b4e8958c13010c9f7436b8723d
2016-11-22 21:42:55 +01:00
Fomafix 35fce8db4b Replace array( ... ) by [ ... ] in PHP
Change-Id: Ib41735975aa242709846a5f3acd04e540dd2cfd4
2016-10-14 18:24:02 +02:00
Chad Horohoe a1736a4f07 Remove inclusion guards on class-only files
Change-Id: I432d22fae9e40a21e2118b6e04843047e3fbf654
2016-10-13 15:04:03 -07:00
Kunal Mehta 2e2069f217 Don't use NS_IMAGE
Change-Id: I541a4eb662a6a6814f2031aa4744bdfdffdbf5ca
2016-09-27 20:31:04 -07:00
Fomafix fc873a1414 Remove unused attribute mIsAjaxRequest
The attribute mIsAjaxRequest is unused since 4b4a6308.

Change-Id: Ief01459527f04a13eb4db7e2d099188fc5c5504e
2016-08-30 12:17:30 +02:00
jenkins-bot f9f5b86ed8 Merge "Remove some dead code" 2016-06-23 10:22:19 +00:00
Kunal Mehta 639afeb684 Remove some dead code
If we were to enable translated titles somehow, I'm fairly sure it would
not end up in the Title class.

Change-Id: If0075ac8d7971929a809cfadc46e87a1a55a4028
2016-05-30 02:53:49 -07:00
Sébastien Santoro 070e6af90c CategoryTreeMode and CategoryTreeHidePrefix constants classes
The extension CT_* defines are replaced by class constants.

We currently keep the former defines in CategoryTree.php,
to help to set the default configuration. When the code
will be migrated to use the extension registration, we'll
remove the defines.

Bug: T87888
Change-Id: I59e6b9319fd5130c51a23f21ea81d4dbf3f28b8e
2016-04-02 01:50:18 +00:00
Sébastien Santoro fee5d0dc01 Move functions outside extension entry point
The extension entry point contains several callback functions, and an
helper function. We move them respectively to the new CategoryTreeHooks
class and to the existing CategoryTree class.

This change is intended to prepare the extension transition to the new
registration system.

Bug: T87888
Change-Id: Ic6ddd6f0dc51e90391f2b8d3c4450683ed67c018
2016-04-02 01:49:43 +00:00
Fomafix 4b4a630807 Remove JavaScript side injection of message 'categorytree-expand'
The JavaScript side injection of message 'categorytree-expand' was introduced in 026cc407.
The intent of not initializing $wgLang does not work anymore, because
there are some other wfMessage() calls in the same request.

Change-Id: Idf0815654e1e095acccbe10afe0726bc8766f8ae
2016-01-31 23:45:00 +00:00
Alex Monk 680cdd688a Use an API module instead of the old (to be removed) ajax functions
Also removes some stuff that appears unused.
Caching depends on Ia18874c9

Bug: T92788
Change-Id: I4d106d8fbfd799a15ef3f8eda06c437b234ec218
2016-01-25 18:26:40 +00:00
Aaron Schulz 4252339bd2 Hash titles and long option strings in cache keys
Change-Id: Ida74d0bc3693b76956711c848022da3b17937d53
2015-11-03 11:43:38 -08:00
Ori Livneh d6b0a4cdf4 MWException -> Exception
Change-Id: Ifcb11e0f7f11f41d657339bf2651ae481816115b
2015-03-25 04:57:50 +00:00
Matthew Flaschen b0c9947349 Remove dead code, tweak comments, related to JavaScript
* Small doc tweak to reflect it no longer uses raw script tags
* Remove getOptionsAsJsString (dead)
* Remove various references to $load and unreachable code that does
  something if it is truthy (there is no way it can be truthy).

  Also, part of this unreachable code calls categoryTreeExpandNode,
  which was removed earlier.

Change-Id: Iacf681f62ffb46554243926e02176e451e5668fd
2015-03-14 13:10:33 +00:00
Fomafix 6b8933be55 Remove dead code
Change-Id: I494fbf146ad905d07e2d67a55fdec7092e778c46
2014-12-01 00:27:18 +00:00
addshore 7a749a6e9a Use public instead of var in classes
Change-Id: I6c34c0f15c9759e9e2b04fd6da93e5c577a40ce5
2014-08-17 22:03:48 +01:00
Brian Wolff daf3e2d9f1 Unbreak this extension by killing $wgCategoryTreeDynamicTag
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
2014-02-19 22:15:55 -04:00
Siebrand Mazeland 3aff44cc17 Correct Title::getInterwiki method name case on call
Change-Id: I9795d208106b5566b450c4a4ceafd9dbefd0ac0b
2014-01-23 20:00:27 +00:00
Vitaliy Filippov 57b0bbe2dd Do not re-implement http_build_query :-)
Change-Id: I9057bce11d7b1c1738f87eaf523ecbaf21b4b596
2013-01-20 22:40:40 +04:00
Reedy ab0a4924fc Bug 43253 - SQL query error in CategoryTree::renderParents
Change-Id: Icc6bf66ca9cdabce417801ca5452e684ff83e6b8
2012-12-19 13:59:55 +00:00
Reedy 60c1daf225 Bug 43077 - CategoryTree git/master does not work with mw 1.20.2 branch
Change-Id: Idf11cf0ffa9ba63fef1c17a5c2b281294748a3f6
2012-12-13 20:36:50 +00:00
Reedy 52e0061e21 Fix mistake from g34493
cl_to had been swapped for cl_title. Revert this

Change-Id: Ieff9ba46a55167b390048afe054371a81f2ccd66
2012-12-04 13:02:56 +00:00
Reedy b2a50356fd Change raw sql into query wrapper
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
2012-11-22 16:53:49 +00:00
Reedy 5a1d878db3 Bug 42110 - CategoryTree: urlencode() expects parameter 1 to be string, array given
Change-Id: Ifcf24a567916d71bdc5c6ef1d27f16892708b915
2012-11-21 23:26:21 +00:00
eranroz f5d36e1dbd Namespace selection option in Special:CategoryTree
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
2012-11-02 00:28:43 +02:00
Siebrand Mazeland 0aeed5ffee Fix regression in I331af864: $subcatCount was dropped accidentally.
Should be cherry picked in 1.20wmf12.

Change-Id: If0a461f8db6a5c8a3b919cf63f2f1f92b74f1534
2012-09-19 12:25:42 -07:00
Siebrand Mazeland fb438e7cc9 (bug 40151) Do not use numParams on params 1-4.
Do not use numParams on params 1-4, as they are only used for customisation.

Change-Id: I331af864c4fe04ac10180e0dd311be8f73b4f634
2012-09-12 09:28:06 -07:00
Siebrand Mazeland 92f3e2f909 Maintenance for CategoryTree extension
* 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
2012-08-29 00:35:39 +02:00
Reedy 427e6849ae Bug 36486 - CategoryTree: get_object_vars() expects parameter 1 to be object, null given
Change-Id: Ibdf188724bee192dceb96d7e55ebe3d1e106facf
2012-05-09 20:01:22 +01:00
Sam Reed d0577cc9c3 Bug 35156 - Harmonise spelling of getArticleID() and getArticleId()
Mass change ->getArticleId() to ->getArticleID()
2012-03-11 19:04:37 +00:00
Krinkle 1da2e2788c [CategoryTree] Fix "bad json errors on options= {":" that are populating wmf error logs
* 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 &quot;
* Xml::openElement does normal attribute escaping, assuming unescaped input

Before:

<div class=" CategoryTreeTag" data-ct-mode="0" data-ct-options="{&amp;quot;mode&amp;quot;:0,&amp;quot;hideprefix&amp;quot;:20,&amp;quot;showcount&amp;quot;:false,&amp;quot;namespaces&amp;quot;:false}">

<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}">
2012-03-02 00:18:09 +00:00
Sam Reed e8f7e97e51 Don't explicitly use Services_JSON, use FormatJson 2012-03-01 01:17:55 +00:00
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