Content deleted Content added
The Earwig (talk | contribs) handle case where makeRequestUrl is called on a title that cannot have a talk page (special pages are an example); see edit request |
HouseBlaster (talk | contribs) bypass redirect |
||
(8 intermediate revisions by 4 users not shown) | |||
Line 17:
template = 'template',
full = 'full',
interface = 'interface',
manual = 'manual'
}
Line 28 ⟶ 29:
return mw.message.newRawMessage(msg):params(params):plain()
end
end▼
if source == mainPage then▼
end
Line 59 ⟶ 50:
function p.makeRequestUrl(level, titleObj)
titleObj = titleObj or mw.title.getCurrentTitle()
local basePage = titleObj.basePageTitle.fullText
if cfg['main-page-content'][basePage] then
return tostring(mw.uri.fullUrl(message('main-page-request-page')))
end
local talkPageName = titleObj.talkPageTitle
if talkPageName == nil then
Line 71 ⟶ 64:
end
level = validateLevel(level)
return tostring(mw.uri.fullUrl(talkPageName, {
action = 'edit',
section = 'new'
}))
▲ end
local sectionname = message(
'preload-title-text',
Line 117 ⟶ 116:
function p._button(args)
return require('Module:Clickable button
[1] = args.display or message('default-display-value'),
url = p.makeRequestUrl(args.type),
|