1
0
mirror of https://github.com/gnosygnu/xowa.git synced 2024-10-27 20:34:16 +00:00

Wikibase: Reset pageEntityId on each new page [#638]

This commit is contained in:
gnosygnu 2020-03-07 23:46:21 -05:00
parent f33f9c4ae9
commit c3d524c493

View File

@ -71,13 +71,16 @@ local entityCache = initCache( 15 )
-- 50 slot cache for statements
local statementCache = initCache( 50 )
-- xowa:bgn
-- NOTE: moved from inside wikibase.setupInterface; ISSUE#:638; DATE:2020-03-07
-- Caching variable for the entity id string belonging to the current page (nil if page is not linked to an entity)
local pageEntityId = false
-- xowa:end
function wikibase.setupInterface()
local php = mw_interface
mw_interface = nil
-- Caching variable for the entity id string belonging to the current page (nil if page is not linked to an entity)
local pageEntityId = false
-- Get the entity id of the connected item, if id is nil. Cached.
local function getIdOfConnectedItemIfNil( id )
if id == nil then
@ -473,6 +476,9 @@ function wikibase.notify_page_changed()
-- reset cache everytime page changes
entityCache = initCache( 15 )
statementCache = initCache( 50 )
-- reset pageEntityId on every page; ISSUE#:638; PAGE:en.s:Author:Victor_Hugo, en.s:Author:Charles_Dickens DATE:2020-03-07
pageEntityId = false
end
-- xowa:end