Content deleted Content added
Fred Gandt (talk | contribs) testing redirect changes |
Fred Gandt (talk | contribs) cleanup; still testing |
||
Line 72:
if title ~= args_name then
contents_of_all_short_description_templates = getShortDescriptionTemplates( args_name_title_table )
end
▲ if contents_of_all_short_description_templates.redlink then return contents_of_all_short_description_templates end
if #contents_of_all_short_description_templates < 1 then
contents_of_all_short_description_templates = getShortDescriptionTemplates( title_table )
Line 176 ⟶ 174:
-- Literally testing if title_table.isRedirect can be expensive;
-- processing this way
local function getTitleAndTable( orig_name )
local title_table = mw.title.new( orig_name )
Line 191 ⟶ 189:
if isEmpty( args_name ) then return { alarm = 'requires a page name (including namespace)' } end
-- Keep the orginal name, cleaned up, and its title_table for later.
local args_name_title_table = mw.title.new( args_name )
args_name = args_name_title_table.prefixedText
if isSisterProjectLink( args_name ) then return nil end
local title, title_table = getTitleAndTable( args_name )
if title ~= args_name then
if isSisterProjectLink( title ) then return nil end end
local only = args.only
Line 244 ⟶ 248:
local args = require( 'Module:Arguments' ).getArgs( frame )
if isEmpty( args ) then return alarmingMessage( 'could not getArgs' ) end -- This really would be alarming.
end
|