From 2c404daca612b43bd6b0b720d3e732d9550c0eab Mon Sep 17 00:00:00 2001 From: Unknwon Date: Thu, 6 Apr 2017 17:20:38 -0400 Subject: [PATCH] pkg/context: rename {CsrfToken, CsrfTokenHtml} -> {CSRFToken, CSRFTokenHTML} --- pkg/context/context.go | 6 +++--- templates/admin/auth/edit.tmpl | 2 +- templates/admin/auth/new.tmpl | 2 +- templates/admin/config.tmpl | 2 +- templates/admin/user/edit.tmpl | 2 +- templates/admin/user/new.tmpl | 2 +- templates/base/head.tmpl | 2 +- templates/org/create.tmpl | 2 +- templates/org/member/invite.tmpl | 2 +- templates/org/settings/delete.tmpl | 2 +- templates/org/settings/options.tmpl | 4 ++-- templates/org/team/members.tmpl | 2 +- templates/org/team/new.tmpl | 2 +- templates/org/team/repositories.tmpl | 2 +- templates/repo/create.tmpl | 2 +- templates/repo/editor/delete.tmpl | 2 +- templates/repo/editor/edit.tmpl | 2 +- templates/repo/editor/upload.tmpl | 4 ++-- templates/repo/issue/labels.tmpl | 6 +++--- templates/repo/issue/milestone_new.tmpl | 2 +- templates/repo/issue/new_form.tmpl | 2 +- templates/repo/issue/view_content.tmpl | 6 +++--- templates/repo/migrate.tmpl | 2 +- templates/repo/pulls/fork.tmpl | 2 +- templates/repo/release/new.tmpl | 2 +- templates/repo/settings/branches.tmpl | 2 +- templates/repo/settings/collaboration.tmpl | 2 +- templates/repo/settings/deploy_keys.tmpl | 2 +- templates/repo/settings/githook_edit.tmpl | 2 +- templates/repo/settings/options.tmpl | 16 ++++++++-------- templates/repo/settings/protected_branch.tmpl | 2 +- templates/repo/settings/webhook/discord.tmpl | 2 +- templates/repo/settings/webhook/gogs.tmpl | 2 +- templates/repo/settings/webhook/slack.tmpl | 2 +- templates/repo/wiki/new.tmpl | 2 +- templates/user/auth/activate.tmpl | 2 +- templates/user/auth/forgot_passwd.tmpl | 2 +- templates/user/auth/login.tmpl | 2 +- templates/user/auth/reset_passwd.tmpl | 2 +- templates/user/auth/signup.tmpl | 2 +- templates/user/auth/two_factor.tmpl | 2 +- .../user/auth/two_factor_recovery_code.tmpl | 2 +- templates/user/settings/applications.tmpl | 2 +- templates/user/settings/avatar.tmpl | 2 +- templates/user/settings/delete.tmpl | 2 +- templates/user/settings/email.tmpl | 4 ++-- templates/user/settings/password.tmpl | 2 +- templates/user/settings/profile.tmpl | 2 +- templates/user/settings/sshkeys.tmpl | 2 +- templates/user/settings/two_factor_enable.tmpl | 2 +- .../user/settings/two_factor_recovery_codes.tmpl | 2 +- 51 files changed, 67 insertions(+), 67 deletions(-) diff --git a/pkg/context/context.go b/pkg/context/context.go index 40d7c8c77..4a11ce064 100644 --- a/pkg/context/context.go +++ b/pkg/context/context.go @@ -212,10 +212,10 @@ func Contexter() macaron.Handler { } } - ctx.Data["CsrfToken"] = x.GetToken() - ctx.Data["CsrfTokenHtml"] = template.HTML(``) + ctx.Data["CSRFToken"] = x.GetToken() + ctx.Data["CSRFTokenHTML"] = template.HTML(``) log.Trace("Session ID: %s", sess.ID()) - log.Trace("CSRF Token: %v", ctx.Data["CsrfToken"]) + log.Trace("CSRF Token: %v", ctx.Data["CSRFToken"]) ctx.Data["ShowRegistrationButton"] = setting.Service.ShowRegistrationButton ctx.Data["ShowFooterBranding"] = setting.ShowFooterBranding diff --git a/templates/admin/auth/edit.tmpl b/templates/admin/auth/edit.tmpl index 0879b274b..b06cee8b8 100644 --- a/templates/admin/auth/edit.tmpl +++ b/templates/admin/auth/edit.tmpl @@ -10,7 +10,7 @@
- {{.CsrfTokenHtml}} + {{.CSRFTokenHTML}}
diff --git a/templates/admin/auth/new.tmpl b/templates/admin/auth/new.tmpl index 1edec0cb3..db59856fc 100644 --- a/templates/admin/auth/new.tmpl +++ b/templates/admin/auth/new.tmpl @@ -10,7 +10,7 @@
- {{.CsrfTokenHtml}} + {{.CSRFTokenHTML}}
diff --git a/templates/admin/config.tmpl b/templates/admin/config.tmpl index 4a95a3377..5d10177ad 100644 --- a/templates/admin/config.tmpl +++ b/templates/admin/config.tmpl @@ -178,7 +178,7 @@
{{.i18n.Tr "admin.config.mailer_user"}}
{{if .Mailer.User}}{{.Mailer.User}}{{else}}(empty){{end}}

- {{.CsrfTokenHtml}} + {{.CSRFTokenHTML}}
diff --git a/templates/admin/user/edit.tmpl b/templates/admin/user/edit.tmpl index 34d0da6fc..330745ce0 100644 --- a/templates/admin/user/edit.tmpl +++ b/templates/admin/user/edit.tmpl @@ -10,7 +10,7 @@
- {{.CsrfTokenHtml}} + {{.CSRFTokenHTML}}
{{.User.Name}} diff --git a/templates/admin/user/new.tmpl b/templates/admin/user/new.tmpl index 9352eaace..1827d4f49 100644 --- a/templates/admin/user/new.tmpl +++ b/templates/admin/user/new.tmpl @@ -10,7 +10,7 @@
- {{.CsrfTokenHtml}} + {{.CSRFTokenHTML}}
diff --git a/templates/base/head.tmpl b/templates/base/head.tmpl index 3be2a6bb1..962939dcf 100644 --- a/templates/base/head.tmpl +++ b/templates/base/head.tmpl @@ -9,7 +9,7 @@ {{end}} - + {{if .GoGetImport}} diff --git a/templates/org/create.tmpl b/templates/org/create.tmpl index 765ef240e..6746adc91 100644 --- a/templates/org/create.tmpl +++ b/templates/org/create.tmpl @@ -3,7 +3,7 @@
- {{.CsrfTokenHtml}} + {{.CSRFTokenHTML}}

{{.i18n.Tr "new_org"}}

diff --git a/templates/org/member/invite.tmpl b/templates/org/member/invite.tmpl index 29e7928f0..9913b62c2 100644 --- a/templates/org/member/invite.tmpl +++ b/templates/org/member/invite.tmpl @@ -6,7 +6,7 @@ {{template "base/alert" .}}

{{.i18n.Tr "org.members.invite_desc" .Org.DisplayName}}

- {{.CsrfTokenHtml}} + {{.CSRFTokenHTML}}
diff --git a/templates/org/settings/delete.tmpl b/templates/org/settings/delete.tmpl index dc1858e5c..6f5aa54ec 100644 --- a/templates/org/settings/delete.tmpl +++ b/templates/org/settings/delete.tmpl @@ -14,7 +14,7 @@

{{.i18n.Tr "org.settings.delete_prompt" | Str2html}}

- {{.CsrfTokenHtml}} + {{.CSRFTokenHTML}}
diff --git a/templates/org/settings/options.tmpl b/templates/org/settings/options.tmpl index 804136543..dcd8d33b2 100644 --- a/templates/org/settings/options.tmpl +++ b/templates/org/settings/options.tmpl @@ -11,7 +11,7 @@
- {{.CsrfTokenHtml}} + {{.CSRFTokenHTML}}
@@ -51,7 +51,7 @@
- {{.CsrfTokenHtml}} + {{.CSRFTokenHTML}}
diff --git a/templates/org/team/members.tmpl b/templates/org/team/members.tmpl index c9240beb2..1c707e93b 100644 --- a/templates/org/team/members.tmpl +++ b/templates/org/team/members.tmpl @@ -25,7 +25,7 @@ {{if .IsOrganizationOwner}}
- {{.CsrfTokenHtml}} + {{.CSRFTokenHTML}}
diff --git a/templates/org/team/new.tmpl b/templates/org/team/new.tmpl index 020eed384..e3e99d813 100644 --- a/templates/org/team/new.tmpl +++ b/templates/org/team/new.tmpl @@ -4,7 +4,7 @@
- {{.CsrfTokenHtml}} + {{.CSRFTokenHTML}}

{{if .PageIsOrgTeamsNew}}{{.i18n.Tr "org.create_new_team"}}{{else}}{{.i18n.Tr "org.teams.settings"}}{{end}}

diff --git a/templates/org/team/repositories.tmpl b/templates/org/team/repositories.tmpl index cc79dd189..480e86c43 100644 --- a/templates/org/team/repositories.tmpl +++ b/templates/org/team/repositories.tmpl @@ -26,7 +26,7 @@ {{if $canAddRemove}}
- {{.CsrfTokenHtml}} + {{.CSRFTokenHTML}}
diff --git a/templates/repo/create.tmpl b/templates/repo/create.tmpl index 59bc252c7..4bf9081d0 100644 --- a/templates/repo/create.tmpl +++ b/templates/repo/create.tmpl @@ -3,7 +3,7 @@
- {{.CsrfTokenHtml}} + {{.CSRFTokenHTML}}

{{.i18n.Tr "new_repo"}}

diff --git a/templates/repo/editor/delete.tmpl b/templates/repo/editor/delete.tmpl index a87425307..4506840bb 100644 --- a/templates/repo/editor/delete.tmpl +++ b/templates/repo/editor/delete.tmpl @@ -4,7 +4,7 @@
{{template "base/alert" .}} - {{.CsrfTokenHtml}} + {{.CSRFTokenHTML}} {{template "repo/editor/commit_form" .}}
diff --git a/templates/repo/editor/edit.tmpl b/templates/repo/editor/edit.tmpl index 64b09c374..67a679d92 100644 --- a/templates/repo/editor/edit.tmpl +++ b/templates/repo/editor/edit.tmpl @@ -4,7 +4,7 @@
{{template "base/alert" .}}
- {{.CsrfTokenHtml}} + {{.CSRFTokenHTML}}