This variable has a very confusing name given that context in which this variable is used (content filtering, editing, article_), the word "text" should refer to the page content, but alas, this variable refers to the page title.
Especially given the existence of wikitext, Revision::getText, text database table etc,.
So why is this variable named that way? It's originally named that way to distinguish itself from article_prefixedtext, which is named after the MediaWiki PHP code method Title::getPrefixedText at which point the word "title" unfortunately got lost, despite being the most important word in that signature.
Title::getPrefixedText itself is named that way to distinguish itself from Title::getText (which is the page name without the namespace prefix), and Title::getDBKey/Title::getPrefixedDBKey, which is a variant of the page title where spaces are replaced with underscores instead.
So all this where the word "text" means (textual form, as opposed to database form).
Proposing to rename these to page_title and page_prefixedtitle.
See also: https://www.mediawiki.org/wiki/Extension:AbuseFilter/Rules_format
We should consider renaming the ones used by move as well - and for all, we'll keep the old ones as aliases for back-compat.
Current | New |
---|---|
article_text | page_title |
article_prefixedtext | page_prefixedtitle |
article_articleid | page_id |
article_restrictions_edit | page_restrictions_edit |
article_restrictions_move | page_restrictions_move |
article_restrictions_create | page_restrictions_create |
article_restrictions_upload | page_restrictions_upload |
article_recent_contributors | page_recent_contributors |
article_first_contributor | page_first_contributor |
moved_to_text | moved_to_title |
moved_to_prefixedtext | moved_to_prefixedtitle |
moved_to_articleid | moved_to_id |
moved_from_text | moved_from_title |
moved_from_prefixedtext | moved_from_prefixedtitle |
moved_from_articleid | moved_from_id |
Workflow
- Add aliases for AbuseFilter and extra logic needed (https://gerrit.wikimedia.org/r/#/c/412487/)
- Move all involved messages to the new ones on translatewiki https://gerrit.wikimedia.org/r/#/c/mediawiki/extensions/AbuseFilter/+/454658/
- Add tests for old and new variables to keep the situation under control (https://gerrit.wikimedia.org/r/#/c/mediawiki/extensions/AbuseFilter/+/454294/)
- Update docs on MWwiki for AF variables
- Make the changes in other extensions
- Flow: https://gerrit.wikimedia.org/r/#/c/mediawiki/extensions/Flow/+/454274/
- HitCounters: https://gerrit.wikimedia.org/r/#/c/454277/
- Move messages from both extensions on translatewiki
- HitCounters done with https://gerrit.wikimedia.org/r/#/c/mediawiki/extensions/HitCounters/+/456714/
- Flow done with https://gerrit.wikimedia.org/r/#/c/mediawiki/extensions/Flow/+/458671/
- Update docs on MWwiki for Flow and HitCounters variables
- Remove old prefixes from other extensions
- Remove extra logic from AbuseFilter (https://gerrit.wikimedia.org/r/#/c/mediawiki/extensions/AbuseFilter/+/454279/)
- Remove extra logic from Flow (https://gerrit.wikimedia.org/r/#/c/mediawiki/extensions/Flow/+/454292/)
- Clearly show deprecated variables with Ace highlight (https://gerrit.wikimedia.org/r/#/c/442361/)
- Plans for further changes: T173889#4522869