Old content in the ParserCache may have scribunto errors tagged using
the 'id' attribute instead of 'class'. We don't need that compatibility
code once the content expires from the parser cache.
Bug: T375539
Follows-Up: I123a0f0046a616f63506f096651ae917bbc65cc5
Change-Id: I22ade9ec45971a96fbbd148fbd11ea9bbd2098cf
isset() should only be used to suppress errors, not for null check.
When the variable is always defined, there is no need to use isset.
Found by a new phan plugin (2efea9f989)
https://www.mediawiki.org/wiki/Manual:Coding_conventions/PHP#isset
Change-Id: Ifba65aad2245b580f4361acf34ab46eabef60611
Implicitly marking parameter $... as nullable is deprecated in PHP
8.4. The explicit nullable type must be used instead.
Bug: T376276
Change-Id: I9cafaa51999fd2740da6c4fec9314fb9ace7c327
Parent class constructor gets type-declaration in 1145328459
Remove simple doc-blocks without further information
Change-Id: I124474e19ad4a0ceaad5104574bc9ed3102ce843
* Use Codex tokens instead of hardcoded colors, picking close ones where
there's no exact match
* Remove unnecessary background styles that will be inherited.
* Add border on input box - looks a bit off (at least in dark mode)
without it.
Bug: T370701
Change-Id: I8076b00aff57dea177d23aaa3698471714ac4a93
This avoids having multiple HTML elements with the same `id` attribute
when certain Scribunto errors reoccur more than once on the same page.
Bug: T375539
Change-Id: I123a0f0046a616f63506f096651ae917bbc65cc5
This avoids addition of new code with the function,
or at least it gives extra attention on review when new code also uses
the inline ignore
Change-Id: I17981b52d9f96ee5f19ba46cf370c7477c81a72a
When the content or categories fields are accessed for the title object
of the current page, skip adding an entry in templatelinks.
* Cuts 5.9 million rows from enwiki templatelinks, where citation
templates use :getContent() to know what date format to use while
formatting citations.
* Prevents confusion about why a page is shown to transclude itself,
frequently brought up on technical support forums.
Change-Id: Id6a5e00572031f4a7258c99c6dc0f802385ee5fe
I have reproduced at least one instance of the message "ParserOutput
does not specify a language and no page language set in helper." by
trying to query a rest.php html endpoint on a module with the
scribunto-doc-page-does-not-exist message deactivated (which is the case
on wikidata).
I do not know if that path is the one that triggers the current large
amount of these messages coming from Wikidata, but it looks reasonable
to fix that one at least.
I'm also not sure this fix is the right one - I'll let people with more
Scribunto and ContentHandler experience chime on that :)
Bug: T362312
Change-Id: I26c1683c803f5cafd08de83e8b428031414d1c4e
Mostly unspecific arrays that can be made more specific. This patch
intentionally doesn't touch any code, only comments.
Change-Id: I5b4690e6160c6c543f9fcb2f62c41f6329d48bdb
Returning true is the same as returning nothing. It's only meaningful
when a hook handler can also return false. Some actually do this.
I'm not touching these.
See Icccf60b for the reasoning why the added `@return void` are
beneficial.
Change-Id: I6de7addee853ff183058e6c84e87a5b275c785e8
No other access in the Title class contains a `get` prefix, so this
makes the title methods consistent.
Bug: T373047
Change-Id: I4a3a7498462b7b3b6143dc61f529e526ccb112e2
Added `categories` property in the lua title class which fetches page
categories. Analogous to getContent() which fetches page content. This
increments the expensive function count.
This enables category-specific editnotices (T85372) and other use-cases.
Bug: T50175
Change-Id: Ie8e0762c537374e6086abe9f9916b8200582776a