Module:Archive index and Module:Archive index/sandbox: Difference between pages
(Difference between pages)
imported>Pppery Add support for leading_zeros= |
imported>Pppery No edit summary |
||
| Line 93: | Line 93: | ||
if mask:find("<#>") then | if mask:find("<#>") then | ||
local archivecount = 0 | local archivecount = 0 | ||
while | while os.clock() < 9 do | ||
archivecount = archivecount + 1 | archivecount = archivecount + 1 | ||
local archivesuffix = tostring(archivecount) | local archivesuffix = tostring(archivecount) | ||
archivesuffix = string.rep("0", leading_zeros - #archivesuffix + 1) .. | archivesuffix = string.rep("0", leading_zeros - #archivesuffix + 1) .. tostring(archivecount) | ||
local title = mw.title.new(mask:gsub("<#>",tostring(archivesuffix))) | local title = mw.title.new(mask:gsub("<#>",tostring(archivesuffix))) | ||
if not title.exists then | if not title.exists then | ||