Module:Category handler: Difference between revisions
Content added Content deleted
(hmm, looks like the computer I was editing this on doesn't like the negation symbol) |
(pass the demospace parameter to Module:Namespace detect) |
||
Line 205: | Line 205: | ||
end |
end |
||
ndargs.page = args.page |
ndargs.page = args.page |
||
⚫ | |||
local ndresult = nsDetect.main(ndargs) |
local ndresult = nsDetect.main(ndargs) |
||
if ndresult then |
if ndresult then |
||
Line 212: | Line 213: | ||
-- Namespace parameters exist; advanced usage. |
-- Namespace parameters exist; advanced usage. |
||
-- If the all parameter is specified, return it. |
-- If the all parameter is specified, return it. |
||
local all = args.all |
|||
if type(all) == 'string' then |
|||
ret = ret .. all |
|||
end |
end |
||
Line 223: | Line 225: | ||
end |
end |
||
end |
end |
||
ndargs.other = args.other |
|||
ndargs.page = args.page |
|||
ndargs.demospace = args.demospace |
|||
⚫ | |||
⚫ | |||
end |
|||
local data = nsDetect.main(ndargs) |
local data = nsDetect.main(ndargs) |
||
Line 238: | Line 237: | ||
-- Remove non-positive integer values, as only positive integers |
-- Remove non-positive integer values, as only positive integers |
||
-- from 1-10 were used with the old template. |
-- from 1-10 were used with the old template. |
||
if datanum > 0 |
if datanum > 0 and math.floor(datanum) == datanum then |
||
local dataArg = args[datanum] |
|||
if type(dataArg) == 'string' then |
|||
ret = ret .. |
ret = ret .. dataArg |
||
⚫ | |||
end |
end |
||
else |
else |