Commit graph

22 commits

Author SHA1 Message Date
Reedy d386dd7fdb Remove _merge_strategy from value
Change-Id: I7845b86671fc200314dab87d8bf1baa11aacc6bc
2020-05-12 18:49:38 +01:00
Reedy d55891c0bb Convert to manifest_version 2
Bug: T252470
Change-Id: I91747d0df49ab217e120f642b16b086001dfcd40
2020-05-12 00:33:41 +00:00
Pppery bc24f21c9d Fix merge strategy for $wgCategoryTreeMaxDepth
Bug: T240623
Change-Id: I1db6d8d5ecf3b720971f9ea4459366a0439c6bb4
2019-12-16 17:55:58 -05:00
Derick Alangi 87ddb7f735 Suppress page translations and render only the default page(s)
This feature add an option `notranslations` that allows the category
tree only to show the default pages and not include their translations
equivalents on the tree. For example let's say we have a page (Test_page)
that was created in a default language "en" in a category TestCat, and has
translations listed: Test_page/es, Test_page/de, Test_page/ar etc.

Doing `<categorytree notranslations="on">TestCat</categorytree> will render
only the Test_page page with it's link to the page on the tree and nothing
more.

Note: If page "Foo/hu" exist but "Foo" doesn't, it should include "Foo/hu"
      in the category tree. In most case though, a base page will exist.
      Also, the feature is only available if Extension:Translate is made
      available on that wiki.

TODO: If "notranslations" is used along side with "showcount", consider
      subtracting the number of pages suppressed from the total page count
      in the category tree for consistency.

Bug: T229265
Change-Id: Ib4e7ab6ad98c05857cda1cd98bbc19e0504677bb
2019-11-03 14:03:27 +01:00
Umherirrender e801fb1e3b Define visibility on class constant
Change-Id: I140d4cbf7bf1397138fef1f1396057fc19c1cbb2
2019-10-25 19:14:46 +02:00
Amir Aharoni 5723ae91d1 Split apihelp messages to a separate file
Bug: T189982
Change-Id: I915b0d5b0dc4232d8999c5fcf246274537503121
2019-05-11 11:05:07 +03:00
Timo Tijhof c839756b32 Remove 'wgCategoryTreePageCategoryOptions' export from pageview HTML
This was internal to CategoryTree JS code and only needed on very
few pages. Export it as part of the module that needs it, instead.

Given this is computed and not a plain config var, use callback
to generate the value.

Bug: T219342
Change-Id: I790a98128b0a3317e27ac0d5fda08d48aeb640dc
2019-04-05 11:31:03 -07:00
Max Semenik 60884c60e7 Stop manually messing with caching HTTP headers
It has origins in times when this code was in an AJAX function, however
now that it's in an API module it's not needed and can be counter-productive
as headers issued might conflict with MW headers. Let the API take care of
this via its standard means.

Change-Id: I8ebf8e7b935d7d252ac010bc1b88202b87f43e20
2019-03-05 20:55:22 +00:00
Fomafix 99cef2da9b Remove deprecated module 'ext.categoryTree.css'
The module 'ext.categoryTree.css' was renamed to
'ext.categoryTree.styles' in 3cdb4e95f2.

The caches should now be expired.

Change-Id: I4e2e96c088c47e7e3dfa801c56847dc48d68ee4e
2019-02-06 18:44:52 +01:00
Fomafix e31ac9cc84 Use hook SkinBuildSidebar instead of SkinTemplateOutputPageBeforeExec
This change allows the skin to customize if there is a sidebar or not.
For example the SkinApi overloads buildSidebar and therefor the hook
SkinBuildSidebar is not triggered.

Change-Id: Ib39736901f25822d40265ccaa5fd0feea977cdc1
2019-01-22 23:15:07 +00:00
Fomafix 095040a9e6 Remove hook SkinJoinCategoryLinks
The hook `SkinJoinCategoryLinks` is not used and not triggered.

Also remove the style for the class CategoryTreeCategoryBarItem because
it is only used in skinJoinCategoryLinks::skinJoinCategoryLinks.

Change-Id: I52e4f819ff195fc1fa8a148b0bb58d95a4bf22d7
2019-01-10 20:15:28 +01:00
Fomafix 3cdb4e95f2 Move styles that only used in JavaScript to JavaScript module
Also rename the style module from 'ext.categoryTree.css' to
'ext.categoryTree.styles'.
Keep the previous module name 'ext.categoryTree.css' for compability to
cached versions.
Also move the files of the module 'ext.categoryTree' into a
subdirectory ext.categoryTree.

Change-Id: Ie5ea28acfb43e33a94ec5824baf4f26d63d8e9e6
2019-01-10 13:38:58 +01:00
James D. Forrester 96b44610ac API: Drop back-compat. code for old versions of MW we don't support
Change-Id: I1eb8f75399a6cd10a685ede98673cc6122494980
2018-10-26 18:02:44 +00:00
Kunal Mehta d85ca412b7 Don't conditionally register any hooks
Register all hooks unconditionally in extension.json, and then in the
hook
itself, check whether they should be doing anything.

Change-Id: I5f0019fc444371a24a11a25ca2d980c0a9ab5a61
2018-04-16 18:05:06 +00:00
Tulsi Bhagat 9e98b1c4a5 Removed deprecated position statements from resource loader module
Bug: T184257
Change-Id: Ib8c741b7eef50deb79ae2bc0d71c913077f95df7
2018-02-12 12:18:17 +00:00
Kunal Mehta 8e51ea4e3a Move classes into includes/
Change-Id: I308523aa764594798d72974fb79e19aef6c3f342
2018-02-08 22:23:07 -08:00
Kunal Mehta 525a4121ec Use SPDX 3.0 license identifier
SPDX released version 3 of their license list (<https://spdx.org/licenses/>),
which changed the FSF licenses to explicitly end in -only or -or-later
instead of relying on an easy to miss + symbol.

Bug: T183858
Change-Id: Ie7dda5637ce63abd241cfca73ee37b3d014d2efb
2018-01-04 02:52:36 -08:00
Dolfinus 23b2dd947f Add MobileFrontend support
Bug: T171767
Change-Id: I302876cd8fee451ad75e3e84a4d951edd324ff28
2017-12-18 21:09:08 +01:00
Umherirrender 1f1defc070 Split CategoryPageSubclass.php into two files
Makes MediaWiki.Files.OneClassPerFile.MultipleFound pass


Change-Id: Ic4d064272a5297e33b1edc090b807937cfb06545
2017-12-16 13:03:29 +01:00
Fomafix 5d0737d3b3 Add missing dependency on module 'mediawiki.api'
ext.categoryTree.js uses mw.Api.

Change-Id: If069cf500fcf8a93d561ad68b1aea57446cbf5b4
2017-06-27 14:54:54 +02: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
Sébastien Santoro 26affac7f8 Migrate to extension registration
We keep constants in CategoryTree.php extension loader to maintain
backwards compatibility with the MediaWiki configuration. It's expected
users will migrate from them when they switch to wfLoadExtension.

Bug: T87888
Change-Id: If67d0fe2ff758c7fd41386d04f5c0839c8c665a1
2016-08-06 00:52:47 +00:00