Khác biệt giữa bản sửa đổi của “Mô đun:WikidataIB”

Không có tóm lược sửa đổi
Thẻ: Lùi lại thủ công
Không có tóm lược sửa đổi
 
(Một sửa đổi ở giữa của cùng người dùng)
Dòng 471: Dòng 471:
local _getCommonslink = function(qid, onlycat, fallback)
local _getCommonslink = function(qid, onlycat, fallback)
qid = (qid or ""):upper()
qid = (qid or ""):upper()
if qid == "" then qid = mw.wikibase.getEntityIdForCurrentPage() end
if qid == "" then
if not qid then return nil end
    if mw.wikibase then
        qid = mw.wikibase.getEntityIdForCurrentPage()
    else
        return nil
    end
end  
if not qid then return nil end
onlycat = parseParam(onlycat, false)
onlycat = parseParam(onlycat, false)
if fallback == "" then fallback = nil end
if fallback == "" then fallback = nil end
Dòng 2.785: Dòng 2.791:
-------------------------------------------------------------------------------
-------------------------------------------------------------------------------
p.pageId = function(frame)
p.pageId = function(frame)
return mw.wikibase.getEntityIdForCurrentPage()
return mw.wikibase and mw.wikibase.getEntityIdForCurrentPage() or nil
end
end