From 2c339fe7c98317a7b343290d709255c27a9b753b Mon Sep 17 00:00:00 2001 From: Nicolas Le Goff Date: Wed, 10 Jul 2013 11:54:24 +0200 Subject: [PATCH] Rename hasLoginTermsOfUse to hasTermsOfUse --- lib/Alchemy/Phrasea/Application.php | 12 +++++++++++- templates/web/login/layout/base-layout.html.twig | 2 +- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/lib/Alchemy/Phrasea/Application.php b/lib/Alchemy/Phrasea/Application.php index efcd24cdcd..fd9a11b168 100644 --- a/lib/Alchemy/Phrasea/Application.php +++ b/lib/Alchemy/Phrasea/Application.php @@ -686,6 +686,11 @@ class Application extends SilexApplication return false; } + /** + * Tells if guests are allowed + * + * @return boolean + */ public function isGuestAllowed() { $usrId = \User_Adapter::get_usr_id_from_login($this, 'invite'); @@ -697,7 +702,12 @@ class Application extends SilexApplication return count(\User_Adapter::getInstance($usrId, $this)->ACL()->get_granted_base()) > 0; } - public function hasLoginTermsOfUse() + /** + * Tells if application has terms of use + * + * @return noolean + */ + public function hasTermsOfUse() { return '' !== \databox_cgu::getHome($this); } diff --git a/templates/web/login/layout/base-layout.html.twig b/templates/web/login/layout/base-layout.html.twig index da02f24500..7fbd9f90e1 100644 --- a/templates/web/login/layout/base-layout.html.twig +++ b/templates/web/login/layout/base-layout.html.twig @@ -78,7 +78,7 @@
  • {% trans "Help" %}
  • - {% if app.hasLoginTermsOfUse() %} + {% if app.hasTermsOfUse() %}
  • {% block tou_link %} {% trans "Terms of use" %}