Skip to content

Commit

Permalink
kick the deprecated stuff
Browse files Browse the repository at this point in the history
  • Loading branch information
hjpalpha committed Oct 16, 2024
1 parent 0af506b commit 70b822b
Showing 1 changed file with 0 additions and 34 deletions.
34 changes: 0 additions & 34 deletions components/transfer/commons/transfer_references.lua
Original file line number Diff line number Diff line change
Expand Up @@ -120,12 +120,6 @@ function TransferRef.fromStorageData(referencesData)
end
---@cast referencesData -nil

--fallback processing for pre standardized TRef data, so we do not break stuff
--to be removed after switching to standardized and having everything purged
if Logic.isEmpty(referencesData.reference1type) then
return TransferRef.fromLegacyStorageData(referencesData)
end

return Array.mapIndexes(function(referenceIndex)
local prefix = 'reference' .. referenceIndex
local link = referencesData[prefix]
Expand All @@ -146,34 +140,6 @@ function TransferRef.fromStorageData(referencesData)
end)
end

---@deprecated
---to be removed after switching to standardized and having everything purged
---@param referencesData table
---@return TransferReference[]
function TransferRef.fromLegacyStorageData(referencesData)
return Array.mapIndexes(function(referenceIndex)
local tempArray = mw.text.split(referencesData['reference' .. referenceIndex] or '', ',,,', true)
local refType = tempArray[1]

if not TransferRef.isValidRefType(refType) then return end

local link = Logic.nilIfEmpty(tempArray[2])
if Logic.isEmpty(refType) or refType == WEB_TYPE and not link then return end
return {
link = link,
refType = refType,
text = Logic.nilIfEmpty(tempArray[3]),
title = Logic.nilIfEmpty(tempArray[4]),
transTitle = Logic.nilIfEmpty(tempArray[5]),
language = Logic.nilIfEmpty(tempArray[6]),
author = Logic.nilIfEmpty(tempArray[7]),
publisher = Logic.nilIfEmpty(tempArray[8]),
archiveUrl = Logic.nilIfEmpty(tempArray[9]),
archiveDate = Logic.nilIfEmpty(tempArray[10]),
}
end)
end

---@param references TransferReference[]
---@return TransferReference[]
function TransferRef.makeUnique(references)
Expand Down

0 comments on commit 70b822b

Please sign in to comment.