Page MenuHomePhabricator

Support categories on title objects
Closed, DuplicatePublic

Description

I see per http://www.mediawiki.org/wiki/Extension_talk:Scribunto/Lua_reference_manual#Access_to_MediaWiki_API.3B_access_to_page_text that you don't want to expose the full MW API to Scribunto, but I was wondering whether it wouldn't be too expensive to allow title objects to have a means of accessing the categories for a given page.

I know one could hack something together to check for "[[Category:" within page content but it would be ugly if trying to deal with nowiki blocks, etc. As I recall you may have categories added to their own table anyways, so I thought I would ask about this.

(Since multiple categories are possible, I presume the ideal result form would be a table of category names, perhaps without the "Category:" prefix.)


Version: unspecified
Severity: enhancement

Details

Reference
bz59111

Event Timeline

bzimport raised the priority of this task from to Low.Nov 22 2014, 2:35 AM
bzimport added a project: Scribunto.
bzimport set Reference to bz59111.
bzimport added a subscriber: Unknown Object (MLST).

javascript already has this [mw.config.get('wgCategories')], so there should not be a big problem to add this for lua, too.

*** This bug has been marked as a duplicate of bug 48175 ***

Restricted Application added a subscriber: jeblad. · View Herald TranscriptOct 16 2020, 5:43 PM