Modul:Category handler: Unterschied zwischen den Versionen
Modul:Category handler (Quelltext anzeigen)
Version vom 27. September 2013, 14:05 Uhr
, vor 12 Jahrenpass the demospace parameter to Module:Namespace detect
(hmm, looks like the computer I was editing this on doesn't like the negation symbol) |
(pass the demospace parameter to Module:Namespace detect) |
||
| Zeile 205: | Zeile 205: | ||
end | end | ||
ndargs.page = args.page | ndargs.page = args.page | ||
ndargs.demospace = args.demospace | |||
local ndresult = nsDetect.main(ndargs) | local ndresult = nsDetect.main(ndargs) | ||
if ndresult then | if ndresult then | ||
| Zeile 212: | Zeile 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 | |||
ret = ret . | if type(all) == 'string' then | ||
ret = ret .. all | |||
end | end | ||
| Zeile 223: | Zeile 225: | ||
end | end | ||
end | end | ||
ndargs.other = args.other | |||
ndargs.page = args.page | |||
ndargs.demospace = args.demospace | |||
local data = nsDetect.main(ndargs) | local data = nsDetect.main(ndargs) | ||
| Zeile 238: | Zeile 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 .. dataArg | |||
end | |||
end | end | ||
else | else | ||