Node.js based forum software built for the modern web
refactor: get rid of old function. syntax
Barış Soner Uşaklı98fd0f31f33c
diff --git a/src/views/admin/dashboard/logins.tpl b/src/views/admin/dashboard/logins.tplindex 814b10156d..0d4ca60e0d 100644--- a/src/views/admin/dashboard/logins.tpl+++ b/src/views/admin/dashboard/logins.tpl@@ -21,7 +21,7 @@<td class="d-flex gap-2 align-items-center"><a href="{config.relative_path}/uid/{./user.uid}">{buildAvatar(./user, "18px", true)}</a><a href="{config.relative_path}/uid/{./user.uid}">{./user.username}</a>- {function.userAgentIcons} {../browser} {../version} on {../platform}+ {userAgentIcons(@value)} {../browser} {../version} on {../platform}</td><td class="text-nowrap"><span class="timeago" title="{./datetimeISO}"></span></td></tr>diff --git a/src/views/admin/header.tpl b/src/views/admin/header.tplindex e2f7725123..b9af555fd2 100644--- a/src/views/admin/header.tpl+++ b/src/views/admin/header.tpl@@ -1,10 +1,10 @@<!DOCTYPE html>-<html data-bs-theme="light" lang="{function.localeToHTML, acpLang, defaultLang}" {{{if languageDirection}}}data-dir="{languageDirection}" style="direction: {languageDirection};"{{{end}}}>+<html data-bs-theme="light" lang="{localeToHTML(acpLang, defaultLang)" {{{if languageDirection}}}data-dir="{languageDirection}" style="direction: {languageDirection};"{{{end}}}><head><title>{title}</title>- {{{each metaTags}}}{function.buildMetaTag}{{{end}}}- {{{each linkTags}}}{function.buildLinkTag}{{{end}}}+ {{{each metaTags}}}{buildMetaTag(@value)}{{{end}}}+ {{{each linkTags}}}{buildLinkTag(@value)}{{{end}}}<link rel="stylesheet" type="text/css" href="{relative_path}/assets/admin{{{ if (languageDirection=="rtl") }}}-rtl{{{ end }}}.css?{cache-buster}" /><script>diff --git a/src/views/admin/partials/privileges/category.tpl b/src/views/admin/partials/privileges/category.tplindex 7bb2f92890..9c85ec86d1 100644--- a/src/views/admin/partials/privileges/category.tpl+++ b/src/views/admin/partials/privileges/category.tpl@@ -54,7 +54,7 @@<input autocomplete="off" type="checkbox" class="form-check-input float-none checkbox-helper"></div></td>- {function.spawnPrivilegeStates, cid, privileges.groups.name, ../privileges, ../types}+ {spawnPrivilegeStates(cid, privileges.groups.name, ../privileges, ../types)}</tr>{{{ end }}}</tbody>@@ -133,7 +133,7 @@<input autocomplete="off" type="checkbox" class="form-check-input float-none checkbox-helper"></div></td>- {function.spawnPrivilegeStates, cid, privileges.users.username, ../privileges, ../types}+ {spawnPrivilegeStates(cid, privileges.users.username, ../privileges, ../types)}</tr>{{{ end }}}</tbody>diff --git a/src/views/admin/partials/privileges/global.tpl b/src/views/admin/partials/privileges/global.tplindex 778afa8699..6da2387679 100644--- a/src/views/admin/partials/privileges/global.tpl+++ b/src/views/admin/partials/privileges/global.tpl@@ -41,7 +41,7 @@</td><td></td><td class="text-center"><input autocomplete="off" type="checkbox" class="checkbox-helper"></td>- {function.spawnPrivilegeStates, cid, privileges.groups.name, ../privileges, ../types}+ {spawnPrivilegeStates(cid, privileges.groups.name, ../privileges, ../types)}</tr>{{{ end }}}</tbody>@@ -104,7 +104,7 @@<!-- need this empty --></td><td class="text-center"><input autocomplete="off" type="checkbox" class="checkbox-helper"></td>- {function.spawnPrivilegeStates, cid, privileges.users.username, ../privileges, ../types}+ {spawnPrivilegeStates(cid, privileges.users.username, ../privileges, ../types)}</tr>{{{ end }}}</tbody>diff --git a/src/views/emails/digest.tpl b/src/views/emails/digest.tplindex 3cc21af00a..e1027a9fdd 100644--- a/src/views/emails/digest.tpl+++ b/src/views/emails/digest.tpl@@ -72,7 +72,7 @@<li style="text-decoration: none; list-style-type: none; padding-bottom: 0.5em;"><table role="presentation" cellspacing="0" cellpadding="0" border="0" width="100%"><tr>- <td style="padding: 6px 16px; font-family: -apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol; width: 32px; vertical-align: middle;">{function.renderDigestAvatar}</td>+ <td style="padding: 6px 16px; font-family: -apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol; width: 32px; vertical-align: middle;">{renderDigestAvatar(@value)}</td><td style="padding: 6px 16px; font-family: -apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol; line-height: 16px; color: #333333;"><p style="margin: 0;"><a style="text-decoration:none !important; text-decoration:none; color: #333333;" href="{url}/topic/{topTopics.slug}"><strong>{topTopics.title}</strong></a></p><p style="margin: 0; font-size: 12px;"><a style="text-decoration:none !important; text-decoration:none; color: #aaaaaa; line-height: 16px;" href="{url}/uid/{topTopics.teaser.user.uid}"><strong>{topTopics.teaser.user.displayname}</strong></a></p>@@ -107,7 +107,7 @@<li style="text-decoration: none; list-style-type: none; padding-bottom: 0.5em;"><table role="presentation" cellspacing="0" cellpadding="0" border="0" width="100%"><tr>- <td style="padding: 6px 16px; font-family: -apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol; width: 32px; vertical-align: middle;">{function.renderDigestAvatar}</td>+ <td style="padding: 6px 16px; font-family: -apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol; width: 32px; vertical-align: middle;">{renderDigestAvatar(@value)}</td><td style="padding: 6px 16px; font-family: -apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol; line-height: 16px; color: #333333;"><p style="margin: 0;"><a style="text-decoration:none !important; text-decoration:none; color: #333333;" href="{url}/topic/{popularTopics.slug}"><strong>{popularTopics.title}</strong></a></p><p style="margin: 0; font-size: 12px;"><a style="text-decoration:none !important; text-decoration:none; color: #aaaaaa; line-height: 16px;" href="{url}/uid/{popularTopics.teaser.user.uid}"><strong>{popularTopics.teaser.user.displayname}</strong></a></p>@@ -142,7 +142,7 @@<li style="text-decoration: none; list-style-type: none; padding-bottom: 0.5em;"><table role="presentation" cellspacing="0" cellpadding="0" border="0" width="100%"><tr>- <td style="padding: 6px 16px; font-family: -apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol; width: 32px; vertical-align: middle;">{function.renderDigestAvatar}</td>+ <td style="padding: 6px 16px; font-family: -apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol; width: 32px; vertical-align: middle;">{renderDigestAvatar(@value)}</td><td style="padding: 6px 16px; font-family: -apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol; line-height: 16px; color: #333333;"><p style="margin: 0;"><a style="text-decoration:none !important; text-decoration:none; color: #333333;" href="{url}/topic/{recent.slug}"><strong>{recent.title}</strong></a></p><p style="margin: 0; font-size: 12px;"><a style="text-decoration:none !important; text-decoration:none; color: #aaaaaa; line-height: 16px;" href="{url}/uid/{recent.teaser.user.uid}"><strong>{recent.teaser.user.displayname}</strong></a></p>