Content deleted Content added
in fact, we can move that in here |
Simplifications |
||
(3 intermediate revisions by one other user not shown) | |||
Line 17:
local dep_values = {}
for k, v in pairs(args) do
if not (k == 'ignoreblank' or k == 'preview' or k == 'deprecated') then
dep_values[k] = v
end
Line 27:
local pargs = frame:getParent().args
for k, v in pairs(pargs) do
if dep_values[k] and (ignoreblank or v ~= '') then
if dep_values[k] and v~='' then▼
▲ table.insert(values, k)
end▼
table.insert(values, k)▼
end ▼
end
end
-- add
local res = {}
if #values
local preview = frame.args['preview'] or
'Page using [['..frame:getParent():getTitle()..']] with deprecated parameter _VALUE_' if isnotempty(preview) then
local deprecated = frame.args['category']▼
end
-- Kind of dangerous to trust that this is never nil, but I guess it's
-- preferable to display that the use of the module is broken rather than
▲ deprecated = preview
-- have some sort of tracking category for pages which have an unknown
for k, v in pairs(values) do▼
-- parent tracking template.
if v == '' then▼
-- Fix odd bug for | = which gets stripped to the empty string and▼
-- breaks category links▼
local r = deprecated:gsub('_VALUE_', ('"'..v..'". replace with "'..dep_values[v]..'"'))▼
table.insert(res, r)▼
▲ local r = deprecated:gsub('_VALUE_', v)
end
local p = preview:gsub(
'_VALUE_',
end
end
|