Modul:Geo: Unterschied zwischen den Versionen

getPLZList() optimiert
(- logs)
(getPLZList() optimiert)
Zeile 91: Zeile 91:


function p.GetPLZList(frame)
function p.GetPLZList(frame)
-- Gets the values from an attribute on a page to be called from Wikitext by #invoke
local sep = frame.args.sep or ";"
local sep = frame.args.sep or ";"
local plzTable = p.getPLZList()
local plzTable = p.getPLZList()
local plzList = str.list(plzTable, sep)
local plzList = str.list(plzTable, sep)
-- mw.log("GetValues(frame)=" .. plzList)
-- mw.log("frame=")
-- mw.logObject(frame)
return plzList
return plzList
end
end


function p.getPLZList()
function p.getPLZList()
local plzlist = que.getPages("[[Kategorie:Postleitzahlen]] [[PLZ::+]]", true)
return {90705, 90762, 90763, 90765, 90766, 90768}
table.sort(plzlist)
-- mw.logObject(plzlist)
return plzlist
end
end