From 70b822badc41707e5793b5ddb9f56775acaa74de Mon Sep 17 00:00:00 2001 From: hjpalpha Date: Wed, 16 Oct 2024 10:02:19 +0200 Subject: [PATCH] kick the deprecated stuff --- .../transfer/commons/transfer_references.lua | 34 ------------------- 1 file changed, 34 deletions(-) diff --git a/components/transfer/commons/transfer_references.lua b/components/transfer/commons/transfer_references.lua index b7b35ae1eb7..8d6fedc89e0 100644 --- a/components/transfer/commons/transfer_references.lua +++ b/components/transfer/commons/transfer_references.lua @@ -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] @@ -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)