Jump to content

Module:Protection banner: Difference between revisions

use a comment instead of a variable assignment to make it clear that protectionObj is the error message
(make the variable names a little more descriptive)
(use a comment instead of a variable assignment to make it clear that protectionObj is the error message)
Line 809: Line 809:
)
)
if not protectionObjCreated then
if not protectionObjCreated then
local errorMessage = protectionObj
local errorBlurb = cfg.msg['error-message-blurb'] or 'Error: $1.'
local errorBlurb = cfg.msg['error-message-blurb'] or 'Error: $1.'
local errorText = mw.message.newRawMessage(errorBlurb):params(errorMessage):plain()
local errorText = mw.message.newRawMessage(errorBlurb)
:params(protectionObj) -- protectionObj is the error message
:plain()
return string.format(
return string.format(
'<strong class="error">%s</strong>',
'<strong class="error">%s</strong>',
Cookies help us deliver our services. By using our services, you agree to our use of cookies.