This was originally a global search and replace. I manually checked all
replacements and reverted them if (due to the lack of type hints) either
null (that would be 0 when counted) or a Countable object can end in the
variable or property in question.
Now this patch only touches places where I'm sure nothing can break.
For the sanity of the honorable reviewers this patch is exclusively touching
negated counts. You should not find a single `!== []` in this patch, that
would be a mistake.
Change-Id: I5eafd4d8fccdb53a668be8e6f25a566f9c3a0a95
Needed for selective updates of pages using a particular feature.
Intended to be run in production, so needs to scale.
Bug: T149723
Change-Id: If20fb1f91de8d4227def5b07d6d52b91161ed3fd
Added for use in the CategoryTree extension to show the category count
on the special page, see If3815586c2a280b4e8958c13010c9f7436b8723d
Change-Id: If195fb55dee1350a6de095892ce89e6565287cd9
This adds 3 tracking categories, one for each type of magic link (ISBN,
RFC, PMID). This will allow wikis to gauge usage and identify pages that
need migrating.
These will only show up if the respective magic links are enabled via
$wgEnableMagicLinks.
Change-Id: Ic483f0c493112bf6373e1b37961e1241c20c3582
Some pages use constructs like `<b/>` or `<span/>` to protect spaces or
special characters at the beginning/end of templates. This syntax is
incompatible with HTML5 parsing rules, which dictate that these should
be treated as open tags, and instead rely on an unusual quirk of the
`tidy` program that removes invalid constructs.
This syntax is deprecated as part of the process of reconciling `tidy`
with modern HTML5 parsing semantics. Authors can use ` ` or `<nowiki/>`
as valid replacements.
In order to provide time to transition existing content, pages using
self-closing tags in violation of the HTML5 parsing specification
will have their templates/pages added to a new tracking category.
After these uses are fixed, we will change the sanitizer to treat these
as normal open tags, to be consistent with the HTML5 parsing spec.
Note that this construct is already disallowed if tidy is disabled; it
is rendered as `<b/>`. We add a tracking category in the no-tidy
case as well, in preparation for eventually making the no-tidy and
with-tidy behaviors consistent.
Bug: T134423
Change-Id: Ie1cf3aa40d5483bf395ece539f0240b694ff04ab
Added to "Pages with ignored display titles" category
(message key: "restricted-displaytitle-ignored")
Follow up to I6ae6d5d0e567ba9c86e46c32240ee51a2ca5d8d1
Bug: T135949
Change-Id: I9e0f8b1e3d39a62c13191bea6734fb136e976e0c
This demonstrates how we can transition from extensions putting
things into the global scope ($wgTrackingCategories) to instead
storing them in the extension registry. This will increase the
overall performance of the extension registry since it no
longer needs to do an array_merge with $wgTrackingCategories.
For extensions already converted to using the registry
no change is needed as the schema is still the same.
Change-Id: Ie0df4c20b123dac784a1c02eb991edc609a911b6
When building the table, each cat and message link results in a database
query. Avoid this by using a LinkBatch
Change-Id: If9e39a94c94b0c2e07822a3fa6cce3a22875d7cf
* Do not use it when not actually using the TablePager
* Always use it when actually using the TablePager
* Use parent::getTableClass() rather than hardcoding it every time
* Place it before other classes to allow overriding
Change-Id: I042b65be64e2c2fa6c68a7bb972a7a2ea7f55b4e
- Added/removed spaces around parenthesis
- Added space after switch/if/foreach
- changed else if to elseif
Change-Id: I99cda543e0e077320091addd75c188cb6e3a42c2
- Message::isDisabled is using the unparsed message text, so this is
always true and not false when a #switch will return '-'.
Using a compare against '-', the same as in
Parser::addTrackingCategory.
- Title::makeTitleSafe can return null, check that
- Add 'trackingcategories-disabled' when array is empty,
this can happen when a '{{' is given, but no categories was found
Change-Id: I88322512db5c4baedc5c571ce9ccbcd0caebb61d
Special:TrackingCategories has special logic to detect people
using {{NAMESPACE}} in their tracking category messages, and
handle it. Make it detect any '{{' to deal with localized
variants. This will make it work for
[[commons:MediaWiki:Broken-file-category]]
Change-Id: Ibac0decc5992d30ae536efc91138ad9b42a569e9
Special page to implement list of Tracking Categories. Global
$wgTrackingCategories added containing list of tracking categories
Bug: 60333
Change-Id: I7d4bb90622a6bae60845942ef93cfe64f229d2d2