From adf0d73c1ab7a82a1464e1cfc0b9be5946e18283 Mon Sep 17 00:00:00 2001 From: Niklas Fiekas Date: Mon, 22 May 2017 15:05:55 +0200 Subject: [PATCH] get rid of autoref --- app/controllers/Auth.scala | 4 +--- app/views/coach/reviewForm.scala.html | 2 +- ui/tournament/src/view/button.js | 2 +- 3 files changed, 3 insertions(+), 5 deletions(-) diff --git a/app/controllers/Auth.scala b/app/controllers/Auth.scala index 7a0b3382c1..985fe9c2d5 100644 --- a/app/controllers/Auth.scala +++ b/app/controllers/Auth.scala @@ -53,9 +53,7 @@ object Auth extends LilaController { } def login = Open { implicit ctx => - val referrer = get("referrer") orElse { - getBool("autoref") ?? HTTPRequest.referer(ctx.req) - } + val referrer = get("referrer") Ok(html.auth.login(api.loginForm, referrer)).fuccess } diff --git a/app/views/coach/reviewForm.scala.html b/app/views/coach/reviewForm.scala.html index 38d3bc9a29..e2a7553f54 100644 --- a/app/views/coach/reviewForm.scala.html +++ b/app/views/coach/reviewForm.scala.html @@ -10,7 +10,7 @@ @if(ctx.isAuth) { Write a review } else { - Review this coach + Review this coach } } diff --git a/ui/tournament/src/view/button.js b/ui/tournament/src/view/button.js index 2f98018d2d..b03a6025c1 100644 --- a/ui/tournament/src/view/button.js +++ b/ui/tournament/src/view/button.js @@ -36,7 +36,7 @@ module.exports = { join: join, joinWithdraw: function(ctrl) { if (!ctrl.userId) return m('a.fbt.text.highlight', { - href: '/login?autoref=1', + href: '/login?referrer=' + window.location.pathname, 'data-icon': 'G' }, ctrl.trans('signIn')); if (ctrl.data.isFinished) return null;