mirror of
https://github.com/alchemy-fr/Phraseanet.git
synced 2025-10-14 13:33:14 +00:00
Merge branch 'master' of github.com:alchemy-fr/Phraseanet
This commit is contained in:
@@ -76,6 +76,7 @@
|
|||||||
</li>
|
</li>
|
||||||
|
|
||||||
{# MODULE #}
|
{# MODULE #}
|
||||||
|
{% if user.ACL.has_access_to_module('upload') %}
|
||||||
<li>
|
<li>
|
||||||
<a target="_blank" href="/upload/">
|
<a target="_blank" href="/upload/">
|
||||||
<span class="{% if module == "upload" %}selected{% endif %}">
|
<span class="{% if module == "upload" %}selected{% endif %}">
|
||||||
@@ -83,6 +84,7 @@
|
|||||||
</span>
|
</span>
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
{# MODULE #}
|
{# MODULE #}
|
||||||
{% if module == "prod" or module == "client" %}
|
{% if module == "prod" or module == "client" %}
|
||||||
|
@@ -14,11 +14,27 @@
|
|||||||
* @license http://opensource.org/licenses/gpl-3.0 GPLv3
|
* @license http://opensource.org/licenses/gpl-3.0 GPLv3
|
||||||
* @link www.phraseanet.com
|
* @link www.phraseanet.com
|
||||||
*/
|
*/
|
||||||
$Core = include_once __DIR__ . '/../../lib/bootstrap.php';
|
$request = Symfony\Component\HttpFoundation\Request::createFromGlobals();
|
||||||
|
|
||||||
$appbox = appbox::get_instance($Core);
|
$locales = \Alchemy\Phrasea\Core::getAvailableLanguages();
|
||||||
$session = $appbox->get_session();
|
|
||||||
phrasea::use_i18n(Session_Handler::get_locale());
|
$current_locale = \Session_Handler::get_locale();
|
||||||
|
|
||||||
|
if (!$current_locale)
|
||||||
|
{
|
||||||
|
foreach ($locales as $code => $locale)
|
||||||
|
{
|
||||||
|
if ($request->getLocale() == $locale)
|
||||||
|
{
|
||||||
|
$current_locale = $locale;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (!$current_locale)
|
||||||
|
$current_locale = 'fr_FR';
|
||||||
|
}
|
||||||
|
|
||||||
|
phrasea::use_i18n($current_locale);
|
||||||
|
|
||||||
$request = http_request::getInstance();
|
$request = http_request::getInstance();
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user