Added named arguments to be safe.

This commit is contained in:
Erik C. Thauvin 2019-09-20 06:48:08 -07:00
parent 68144275b2
commit 2549b97aa9

View file

@ -195,23 +195,23 @@ open class AkismetComment() {
recheckReason: String = "", recheckReason: String = "",
other: Map<String, String> = emptyMap() other: Map<String, String> = emptyMap()
) : this( ) : this(
request.remoteAddr, userIp = request.remoteAddr,
request.getHeader("User-Agent"), userAgent = request.getHeader("User-Agent"),
request.getHeader("Referer"), referrer = request.getHeader("Referer"),
permalink, permalink = permalink,
type, type = type,
author, author = author,
authorEmail, authorEmail = authorEmail,
authorUrl, authorUrl = authorUrl,
content, content = content,
dateGmt, dateGmt = dateGmt,
postModifiedGmt, postModifiedGmt = postModifiedGmt,
blogLang, blogLang = blogLang,
blogCharset, blogCharset = blogCharset,
userRole, userRole = userRole,
isTest, isTest = isTest,
recheckReason, recheckReason = recheckReason,
buildPhpVars(request, other)) other = buildPhpVars(request, other))
} }
private fun buildPhpVars(request: HttpServletRequest, other: Map<String, String>): HashMap<String, String> { private fun buildPhpVars(request: HttpServletRequest, other: Map<String, String>): HashMap<String, String> {