Content deleted Content added
make a sandy box |
move stuff around to where it makes sense |
||
Line 13:
function p.check (frame)
-- create the table of deprecated values and their matching new value▼
local args = frame.args
local pargs = frame:getParent().args▼
local ignoreblank = isnotempty(frame.args['ignoreblank'])▼
local deprecated = frame.args['category']▼
local preview = frame.args['preview'] or 'Page using [['..frame:getParent():getTitle()..']] with deprecated parameter _VALUE_'▼
local dep_values = {}
local values = {}▼
local res = {}▼
▲ -- create the table of deprecated values and their matching new value
for k, v in pairs(args) do
if k == 'ignoreblank' or k == 'preview' or k == 'deprecated' then else
Line 30 ⟶ 22:
end
▲ local preview = frame.args['preview'] or 'Page using [['..frame:getParent():getTitle()..']] with deprecated parameter _VALUE_'
▲ local deprecated = frame.args['category']
if isnotempty(preview) then
preview = '<div class="hatnote" style="color:red"><strong>Warning:</strong> ' .. preview .. ' (this message is shown only in preview).</div>'
Line 37 ⟶ 31:
-- loop over the parent args and see if any are deprecated
▲ local values = {}
▲ local ignoreblank = isnotempty(frame.args['ignoreblank'])
▲ local pargs = frame:getParent().args
for k, v in pairs(pargs) do
if ignoreblank then
Line 50 ⟶ 47:
-- add resuls to the output tables
▲ local res = {}
if #values > 0 then
if frame:preprocess( "{{REVISIONID}}" ) == "" then
|