mirror of
https://github.com/alchemy-fr/Phraseanet.git
synced 2025-10-24 10:23:17 +00:00
Remove get_cgus function from login class
This commit is contained in:
@@ -693,6 +693,11 @@ class Application extends SilexApplication
|
|||||||
return count(\User_Adapter::getInstance($usrId, $this)->ACL()->get_granted_base()) > 0;
|
return count(\User_Adapter::getInstance($usrId, $this)->ACL()->get_granted_base()) > 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function hasTermsOfUse()
|
||||||
|
{
|
||||||
|
return '' !== \databox_cgu::getHome($this);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns an an array of available collection for offline queries
|
* Returns an an array of available collection for offline queries
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -1,12 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
use Alchemy\Phrasea\Application;
|
|
||||||
|
|
||||||
class login
|
class login
|
||||||
{
|
{
|
||||||
|
|
||||||
public function get_cgus(Application $app)
|
|
||||||
{
|
|
||||||
return databox_cgu::getHome($app);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -78,7 +78,7 @@
|
|||||||
<li>
|
<li>
|
||||||
<a href="#">{% trans "Help" %}</a>
|
<a href="#">{% trans "Help" %}</a>
|
||||||
</li>
|
</li>
|
||||||
{% if login.get_cgus(app) is not empty %}
|
{% if app.hasTermsOfUse() %}
|
||||||
<li>
|
<li>
|
||||||
{% block tou_link %}
|
{% block tou_link %}
|
||||||
<a href="{{ path("login_cgus") }}">{% trans "Terms of use" %}</a>
|
<a href="{{ path("login_cgus") }}">{% trans "Terms of use" %}</a>
|
||||||
|
|||||||
Reference in New Issue
Block a user