Page MenuHomePhabricator

Expose siteGlobalID in Lua
Closed, ResolvedPublic

Description

As requested, it should be possible for Lua users to get the site's global id.

While this would thematically fit very well into Scribunto's Site library, only Wikibase currently knows a site's global id (which is caused by the current state of interwiki/site handling in MediaWiki).

I suggest adding mw.wikibase.getGlobalSiteId(). Alternatively, we could expose it simply as field mw.wikibase.globalSiteId or add it to Scribunto's Site library (although this would heavily mess with extension boundaries).

Note: T146616 is related to this as the $wgDBname/wfWikiId() matches the global site id in the WMF setup (but not generally).

Details

Related Gerrit Patches:
mediawiki/extensions/Wikibase : masterAdd "mw.wikibase.getGlobalSiteId"

Event Timeline

hoo created this task.May 7 2018, 10:56 AM
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptMay 7 2018, 10:56 AM
Vvjjkkii renamed this task from Expose siteGlobalID in Lua to shdaaaaaaa.Jul 1 2018, 1:11 AM
Vvjjkkii triaged this task as High priority.
Vvjjkkii updated the task description. (Show Details)
Vvjjkkii removed a subscriber: Aklapper.
CommunityTechBot renamed this task from shdaaaaaaa to Expose siteGlobalID in Lua.Jul 2 2018, 4:22 PM
CommunityTechBot raised the priority of this task from High to Needs Triage.
CommunityTechBot updated the task description. (Show Details)
CommunityTechBot added a subscriber: Aklapper.

Change 540925 had a related patch set uploaded (by Hoo man; owner: Hoo man):
[mediawiki/extensions/Wikibase@master] Add "mw.wikibase.getGlobalSiteId"

https://gerrit.wikimedia.org/r/540925

Thayts added a subscriber: Thayts.Oct 5 2019, 11:30 AM

Change 540925 merged by jenkins-bot:
[mediawiki/extensions/Wikibase@master] Add "mw.wikibase.getGlobalSiteId"

https://gerrit.wikimedia.org/r/540925

Thank you all! :)

Pppery awarded a token.Sun, Nov 3, 2:55 PM
Maintenance_bot moved this task from incoming to in progress on the Wikidata board.Sun, Nov 3, 3:15 PM