Changes

no edit summary
Line 34: Line 34:     
local function wikidata_article_name_get (q)
 
local function wikidata_article_name_get (q)
 +
-- TODO: Remove call to mw.wikibase
 
if not is_set (q) or (q and not mw.wikibase) then -- when no q number or when a q number but mw.wikibase not installed on this wiki
 
if not is_set (q) or (q and not mw.wikibase) then -- when no q number or when a q number but mw.wikibase not installed on this wiki
 
return nil; -- abandon
 
return nil; -- abandon
Line 41: Line 42:  
local this_wiki_code = cfg.this_wiki_code; -- Wikipedia subdomain; 'en' for en.wikipedia.org
 
local this_wiki_code = cfg.this_wiki_code; -- Wikipedia subdomain; 'en' for en.wikipedia.org
    +
-- TODO: Remove call to mw.wikibase
 
wd_article = mw.wikibase.getSitelink (q, this_wiki_code .. 'wiki'); -- fetch article title from WD; nil when no title available at this wiki
 
wd_article = mw.wikibase.getSitelink (q, this_wiki_code .. 'wiki'); -- fetch article title from WD; nil when no title available at this wiki