Modul:Wikidata: Perbedaan antara revisi

Konten dihapus Konten ditambahkan
-- version 20200415 from master @cawiki
fix galat pageId
Baris 955:
end
return list, listed
end
 
-- returns the page id (Q...) of the current page or nothing of the page is not connected to Wikidata
function p.pageId(frame)
local entity = mw.wikibase.getEntityObject()
if not entity then return nil else return entity.id end
end
 
function p.claim(frame)
if mw.title.new(frame:getParent():getTitle()).isContentPage then
if not mw.title.new(frame:getTitle()).isSubpage then
-- invoked from a content page and not invoking a module subpage
return printError("not-from-content-page")
end
end
return p._main(frame.args, frame:getParent().args)
end