Merge branch 'master' of github.com:alchemy-fr/Phraseanet

This commit is contained in:
Romain Neutron
2012-03-30 15:17:11 +02:00
2 changed files with 22 additions and 4 deletions

View File

@@ -76,6 +76,7 @@
</li>
{# MODULE #}
{% if user.ACL.has_access_to_module('upload') %}
<li>
<a target="_blank" href="/upload/">
<span class="{% if module == "upload" %}selected{% endif %}">
@@ -83,6 +84,7 @@
</span>
</a>
</li>
{% endif %}
{# MODULE #}
{% if module == "prod" or module == "client" %}

View File

@@ -14,11 +14,27 @@
* @license http://opensource.org/licenses/gpl-3.0 GPLv3
* @link www.phraseanet.com
*/
$Core = include_once __DIR__ . '/../../lib/bootstrap.php';
$request = Symfony\Component\HttpFoundation\Request::createFromGlobals();
$appbox = appbox::get_instance($Core);
$session = $appbox->get_session();
phrasea::use_i18n(Session_Handler::get_locale());
$locales = \Alchemy\Phrasea\Core::getAvailableLanguages();
$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();